Release 0.117.0
Deprecated features:
- cbor_view has been deprecated. Rationale: The complexity of supporting and documenting this component
exceeded its benefits.
New features
-
New
json_optionsoptiondec_to_str. If set totrue, parse decimal numbers as strings with
semantic taggingsemantic_tag_type::big_decimalinstead of double. Defaults tofalse. -
The
ojson(order preserving) implementation now has an index to support binary search
for retrieval. -
Added
std::string_viewdetection -
jsoncons-CBOR semantic tagging supported for CBOR tags 32 (uri)
Name changes (non-breaking)
- The json options name
bignum_chars_formathas been deprecated and replaced withbig_integer_chars_format. big_integer_chars_format::integer(bignum_chars_format::integer) has been deprecated and replaced with
big_integer_chars_format::number- The
json_options functionbignum_formathas been deprecated and replaced withbig_integer_format
Changes to floating-point printing
-
If the platform supports the IEEE 754 standard, jsoncons now uses the Grisu3 algorithm for printing floating-point numbers,
falling back to a safe method using C library functions for the estimated 0.5% of floating-point numbers that might be rejected by Grisu3.
The Grisu3 implementation follows Florian Loitsch's grisu3_59_56
implementation. If the platform does not support the IEEE 754 standard, the fall back method is used. -
In previous versions, jsoncons preserved information about the format, precision, and decimal places
of the floating-point numbers that it read, and used that information when printing them. With the
current strategy, that information is no longer needed. Consequently, thefloating_point_options
parameter in thedo_double_valueanddouble_valuefunctions of the SAX-style interface have
been removed. -
The
jsonfunctionsprecision()anddecimal_places()have been deprecated and return 0
(as this information is no longer preserved.) -
The constructor
json(double val, uint8_t precision)has been deprecated. -
Note that it is still possible to set precision as a json option when serializing.