Skip to content

Commit

Permalink
expose new write flag [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbutuseless committed Apr 9, 2024
1 parent fbd212a commit 504f99c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
19 changes: 11 additions & 8 deletions R/json-opts.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ yyjson_read_flag <- list(
#' This flag does not affect the performance of correctly encoded strings.}
#' \item{YYJSON_WRITE_PRETTY_TWO_SPACES}{Write JSON pretty with 2 space indent.
#' This flag will override `YYJSON_WRITE_PRETTY` flag.}
#' \item{YYJSON_WRITE_NEWLINE_AT_END}{Adds a newline character
#' at the end of the JSON. This can be helpful for text editors or NDJSON}
#' }
#'
#' @export
Expand All @@ -146,14 +148,15 @@ yyjson_read_flag <- list(
#' ))
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
yyjson_write_flag <- list(
YYJSON_WRITE_NOFLAG = 0L,
YYJSON_WRITE_PRETTY = 1L,
YYJSON_WRITE_ESCAPE_UNICODE = 2L,
YYJSON_WRITE_ESCAPE_SLASHES = 4L,
YYJSON_WRITE_ALLOW_INF_AND_NAN = 8L,
YYJSON_WRITE_INF_AND_NAN_AS_NULL = 16L,
YYJSON_WRITE_ALLOW_INVALID_UNICODE = 32L,
YYJSON_WRITE_PRETTY_TWO_SPACES = 64L
YYJSON_WRITE_NOFLAG = 0L,
YYJSON_WRITE_PRETTY = 1L,
YYJSON_WRITE_ESCAPE_UNICODE = 2L,
YYJSON_WRITE_ESCAPE_SLASHES = 4L,
YYJSON_WRITE_ALLOW_INF_AND_NAN = 8L,
YYJSON_WRITE_INF_AND_NAN_AS_NULL = 16L,
YYJSON_WRITE_ALLOW_INVALID_UNICODE = 32L,
YYJSON_WRITE_PRETTY_TWO_SPACES = 64L,
YYJSON_WRITE_NEWLINE_AT_END = 128L
)


Expand Down
4 changes: 3 additions & 1 deletion man/yyjson_write_flag.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 504f99c

Please sign in to comment.