Skip to content

Releases: danielaparker/jsoncons

Release 0.127.0

23 Jun 11:43

Choose a tag to compare

Changes to staj streaming classes

  • json_cursor no longer has a constructor that accepts a staj_filter.
    Use a filtered_staj_reader instead.

  • The staj_event function as<T> has been deprecated and renamed to get<T>.

  • The staj_event function accept has been renamed to read_to.

Enhancements

  • New macro JSONCONS_NONDEFAULT_MEMBER_TRAITS_DECL, that, when decoding to a C++ object,
    requires all data members declared for the object to be present in the JSON (or other supported
    format.)

  • Types that are specialized in json_type_traits are no longer required to have a public default
    constructor. In particular, types that are specialized using JSONCONS_MEMBER_TRAITS_DECL
    or JSONCONS_NONDEFAULT_MEMBER_TRAITS_DECL may have a private default constructor + JSONCONS_TYPE_TRAITS_FRIEND,
    and types that are specialized with JSONCONS_GETTER_CTOR_TRAITS_DECL are not required to have a default
    constructor at all.

Release 0.126.0

31 May 23:02

Choose a tag to compare

0.126.0

Enhancements

  • The json_reader and csv_reader constructors have been generalized to take either a value
    from which a jsoncons::string_view is constructible (e.g. std::string), or a value from which
    a source_type is constructible (e.g. std::istream).

  • With this enhancement, the convenience typedefs json_string_reader and csv_string_reader are no
    longer needed, and have been deprecated.

Name change

  • The name json_pull_reader has been deprecated (still works) and renamed to json_cursor

Changes to bigfloat mapping

In previous versions, jsoncons arrays that contained

  • an int64_t or a uint64_t (defines base-2 exponent)
  • an int64_t or a uint64_t or a string tagged with semantic_tag::bigint (defines the mantissa)

and that were tagged with semantic_tag::bigfloat, were encoded into CBOR bigfloats.
This behaviour has been deprecated.

CBOR bigfloats are now decoded into a jsoncons string that consists of the following parts

  • (optional) minus sign
  • 0x
  • nonempty sequence of hexadecimal digits (defines mantissa)
  • p followed with optional minus or plus sign and nonempty sequence of hexadecimal digits (defines base-2 exponent)

and tagged with semantic_tag::bigfloat (before they were decoded into a jsoncons array and tagged with semantic_tag::bigfloat)

jsoncons strings that consist of the following parts

  • (optional) plus or minus sign
  • 0x or 0X
  • nonempty sequence of hexadecimal digits optionally containing a decimal-point character
  • (optional) p or P followed with optional minus or plus sign and nonempty sequence of decimal digits,

and tagged with semantic_tag::bigfloat are now encoded into CBOR bignums.

Release 0.125.0

18 May 15:01

Choose a tag to compare

CMake build fix

  • The CMAKE_BUILD_TYPE variable is now left alone if already set

Non-breaking changes to lighten semantic_tag names

  • The semantic_tag enum values big_integer, big_decimal, big_float and date_time
    have been deprecated (still work) and renamed to bigint, bigdec, bigfloat and datetime.

  • The json_content_handler functions big_integer_value, big_decimal_value, date_time_value
    and timestamp_value have been deprecated (still work.) Calls to these functions should be replaced
    by calls to string_value with semantic_tag::bigint, semantic_tag::bigdec, and semantic_tag::datetime,
    and by calls to int64_vaue with semantic_tag::timestamp.

  • The enum type big_integer_chars_format has been deprecated (still works) and renamed to
    bigint_chars_format.

  • The json_options modifier big_integer_format has been deprecated (still works) and renamed to
    bigint_format.

Non-breaking changes to ser_context, ser_error and jsonpath_error

  • The function names line_number and column_number have been deprecated (still work) and
    renamed to line and column.

Release 0.124.0

13 May 20:47

Choose a tag to compare

  • Fixed bug in json_encoder with pad_inside_array_brackets and pad_inside_object_braces options

  • Fixed issue with escape character in jsonpath quoted names.

  • Fixed pedantic level compiler warnings

  • Added doozer tests for CentOS 7.6 and Fedora release 24

  • New macro JSONCONS_GETTER_CTOR_TRAITS_DECL that can be used to generate the json_type_traits boilerplate from getter functions and a constructor.

Release 0.123.2

27 Apr 10:25

Choose a tag to compare

defect fix:

  • Fixed name of JSONCONS_MEMBER_TRAITS_DECL

Release 0.123.1

26 Apr 13:16

Choose a tag to compare

jsonpath bug fixes:

  • Fixed bug in construction of normalized paths #177.

  • Fixed bug in jsonpath recursive descent with filters which could result in too many values being returned

Release 0.123.0

25 Apr 01:50

Choose a tag to compare

Warning fix:

  • Removed redundant macro continuation character #176

Non-breaking change to names (old name still works)

  • The name JSONCONS_TYPE_TRAITS_DECL has been deprecated and changed to JSONCONS_MEMBER_TRAITS_DECL

Changes to jsonpath:

  • jsonpath unions now return distinct values (no duplicates)
  • a single dot immediately followed by a left bracket now results in an error (illegal JSONPath)

Enhancements to jsonpath

  • Union of completely separate paths are allowed, e.g.

    $[firstName,address.city]

  • Names in the dot notation may be single or double quoted

Other enhancements:

  • basic_json now supports operators <, <=, >, >=

Release 0.122.0

08 Apr 22:36

Choose a tag to compare

Changes:

  • The template parameter CharT has been removed from the binary encoders
    basic_bson_encoder, basic_cbor_encoder, basic_msgpack_encoder,
    and basic_ubjson_encoder.

Enhancements:

  • Added macro JSONCONS_TYPE_TRAITS_FRIEND

  • Generalized the csv_encode, bson_encode, cbor_encode, msgpack_encode and ubjson_encode functions to convert from any type T that implements json_type_traits

  • Generalized the csv_decode, bson_decode, cbor_decode, msgpack_decode and ubjson_decode functions to convert to any type T that implements json_type_traits

Release 0.121.1

01 Apr 00:18

Choose a tag to compare

Bug fix:

  • Fixed issue with cbor_reader only reading tag values 0 through 23

Name change

  • The name json::semantic_tag() has been renamed to json::get_semantic_tag()

Non-breaking changes (old names still work)

  • The name semantic_tag_type has been deprecated and renamed to semantic_tag
  • The names json_serializer, bson_serializer, cbor_serializer, csv_serializer, msgpack_serializer,
    and ubjson_serializer have been deprecated and renamed to json_encoder, bson_encoder,
    cbor_encoder, csv_encoder, msgpack_encoder, and ubjson_encoder
  • The names bson_buffer_serializer, cbor_buffer_serializer, msgpack_buffer_serializer,
    and ubjson_buffer_serializer have been deprecated and renamed to bson_bytes_encoder,
    cbor_bytes_encoder, msgpack_bytes_encoder, and ubjson_bytes_encoder
  • The names bson_buffer_reader, cbor_buffer_reader, msgpack_buffer_reader,
    and ubjson_buffer_reader have been deprecated and renamed to bson_bytes_reader,
    cbor_bytes_reader, msgpack_bytes_reader, and ubjson_bytes_reader

Enhancements

  • Cleanup of encode_json and decode_json functions and increased test coverage
  • Rewrote cbor_reader to avoid recursive function call
  • CBOR reader supports stringref extension to CBOR
  • New cbor_options has packed_strings option

Release 0.120.0

21 Mar 21:48

Choose a tag to compare

Bug fix:

  • Fixed issue with j.as<byte_string_view>()

Non-breaking changes

  • The name is_json_type_traits_impl has been deprecated and renamed to is_json_type_traits_declared
  • The name serializing_context has been deprecated and renamed to ser_context
  • The name serialization_error has been deprecated and renamed to ser_error

Enhancements

  • json as_byte_string attempts to decode string values if semantic_tag_type is base64, base64url, or base16.

  • New macro JSONCONS_TYPE_TRAITS_DECL that can be used to generate the json_type_traits boilerplate
    for your own types.

  • New basic_json member function get_allocator