Skip to content

Release 0.117.0

Choose a tag to compare

@danielaparker danielaparker released this 18 Jan 05:24
· 8236 commits to master since this release

Deprecated features:

  • cbor_view has been deprecated. Rationale: The complexity of supporting and documenting this component
    exceeded its benefits.

New features

  • New json_options option dec_to_str. If set to true, parse decimal numbers as strings with
    semantic tagging semantic_tag_type::big_decimal instead of double. Defaults to false.

  • The ojson (order preserving) implementation now has an index to support binary search
    for retrieval.

  • Added std::string_view detection

  • jsoncons-CBOR semantic tagging supported for CBOR tags 32 (uri)

Name changes (non-breaking)

  • The json options name bignum_chars_format has been deprecated and replaced with big_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 function bignum_format has been deprecated and replaced with big_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, the floating_point_options
    parameter in the do_double_value and double_value functions of the SAX-style interface have
    been removed.

  • The json functions precision() and decimal_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.