Release 0.113.0
Bug fix
- Fixed issue with indefinite length byte strings, text strings, arrays,
and maps nested inside other CBOR items (wasn't advancing the
input pointer past the "break" indicator.)
Changes
-
FILE and LINE macros removed from JSONCONS_ASSERT
if not defined _DEBUG (contributed by zhskyy.) -
semantic_tag_type name
decimalchanged todecimal_fraction
New CBOR feature
-
CBOR semantic tagging of expected conversion of byte strings
to base64, base64url and base16 are preserved and respected in JSON
serialization (unless overridden injson_serializing_options.) -
CBOR semantic tagging of bigfloat preserved with
semantic_tag_type::bigfloat -
CBOR non text string keys converted to strings when decoding
to json values
Changes to json_serializing_options
New options
- spaces_around_colon (defaults to
space_after) - spaces_around_comma (defaults to
space_after) - pad_inside_object_braces (defaults to
false) - pad_inside_array_brackets (defaults to
false) - line_length_limit (defaults to '120`)
- new_line_chars (for json serialization, defaults to
\n)
nan_replacement, pos_inf_replacement, and neg_inf_replacement are deprecated (still work)
These have been replaced by
- nan_to_num/nan_to_str
- inf_to_num/inf_to_str
- neginf_to_num/neginf_to_str (default is
-followed by inf_to_num/inf_to_str)
nan_to_str, inf_to_str and neginf_to_str are also used to substitute back to nan, inf and neginf in the parser.
-
Long since deprecated options
array_array_block_option,
array_object_block_option,object_object_block_optionand
object_array_block_optionhave been removed. -
The names
object_array_split_lines,object_object_split_lines,
array_array_split_linesandarray_object_split_lineshave
been deprecated (still work) and renamed toobject_array_line_splits,
object_object_line_splits,array_array_line_splitsandarray_object_line_splits.
Rationale: consistency withline_split_kindname.
Changes to json_serializer
-
Previously the constructor of
json_serializertook an optional argument to
indicate whether "indenting" was on.json_serializernow always produces
indented output, so this argument has been removed. -
A new class
json_compressed_serializerproduces compressed json without
indenting.The jsoncons functions that perform serialization including
json::dump,
pretty_printand the output stream operator are unaffected.