diff --git a/R/json-opts.R b/R/json-opts.R index 120a1d7..68a8501 100644 --- a/R/json-opts.R +++ b/R/json-opts.R @@ -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 @@ -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 ) diff --git a/man/yyjson_write_flag.Rd b/man/yyjson_write_flag.Rd index c42f93c..a12ff2c 100644 --- a/man/yyjson_write_flag.Rd +++ b/man/yyjson_write_flag.Rd @@ -5,7 +5,7 @@ \alias{yyjson_write_flag} \title{Advanced: Values for setting internal options directly on YYJSON library} \format{ -An object of class \code{list} of length 8. +An object of class \code{list} of length 9. } \usage{ yyjson_write_flag @@ -46,6 +46,8 @@ escaped as \code{U+FFFD} (replacement character). 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 \code{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} } } \examples{