Skip to content

Releases: danielaparker/jsoncons

Release 0.102.1

28 Jan 08:28
Compare
Choose a tag to compare

Bug fix:

Fixed an off-by-one error that could lead to an out of bounds read. Reported by mickcollyer (issue #145)

Release 0.102.0

22 Jan 00:18
Compare
Choose a tag to compare

Bug fixes:

Fixed issue with how jsonpath filters are applied to arrays in the presence of recursion, resulting in
duplicate results.

Changes:

The signatures of jsonpointer::get, jsonpointer::insert, jsonpointer::insert_or_assign,
jsonpointer::remove and jsonpointer::replace have been changed to be consistent
with other functions in the jsoncons library. Each of these functions now has two overloads,
one that takes an std::error_code parameter and uses it to report errors, and one that
throws a jsonpointer_error exception to report errors.

The function jsonpatch::patch has been replaced by jsonpatch::apply_patch, which takes
a json document, a patch, and a std::error_code& to report errors. The function
jsonpatch::diff has been renamed to jsonpatch::from_diff

The old signatures for encode_cbor and encode_msgpack that returned a std::vector<uint8_t>
have been deprecated and replaced by new signatures that have void return values and have
an output parameter 'std::vector<uint8_t>&'. The rationale for this change is consistency
with other functions in the jsoncons library.

Release 0.101.0

10 Jan 10:09
Compare
Choose a tag to compare

0.101.0

Fixes:

  • Fixes to string_view code when JSONCONS_HAS_STRING_VIEW is defined in jsoncons_config.hpp

Changes:

  • as_double throws if json value is null (previously returned NaN)

Enhancements:

  • Added convenience functions decode_csv and encode_csv
  • Support custom allocaor (currently stateless only) in json_decoder, json_reader,
    csv_reader, csv_parameters

Release 0.100.2

27 Oct 11:05
Compare
Choose a tag to compare

Resolved warnings on GCC Issue #127

Release 0.100.1

26 Oct 03:23
Compare
Choose a tag to compare

Fix for platform issue with vs2017:

  • Renamed label minus to minus_sign in json_parser.hpp

Enhancements:

  • New classes byte_string and byte_string_view, to augment support for cbor byte strings in json values

Version 0.100.0

16 Oct 13:46
Compare
Choose a tag to compare

Changes:

  • template <class CharT> json_traits<CharT> replaced with sorted_policy

  • template <class CharT> o_json_traits<CharT> replaced with preserve_order_policy

  • The return type for the json::get_with_default function overload for const char* has been
    changed from const char* to json::string_view_type, which is assignable to std::string.

  • New functions byte_string_value and do_byte_string_value have been added to
    basic_json_input_handler and basic_json_output_handler

  • json::is<const char*>() and json::as<const char*>() specializations (supported but never
    documented) have been deprecated

  • In android specific string_to_double, strtod_l changed to strtold_l

Enhancements:

  • The json class and the decode_cbor and encode_cbor functions now support byte strings
    A json byte string value will, when serialized to JSON, be converted to a base64url string.

  • version.hpp added to include directory

0.99.9.2

04 Oct 17:18
Compare
Choose a tag to compare

Bug fixes:

  • Fixed issue with jsonpatch::diff (fix contributed by Alexander (rog13))

Enhancements:

  • New class cbor_view for accessing packed cbor values. A cbor_view satisfies the requirements for jsonpointer::get.

Release 0.99.9.1

19 Sep 17:15
Compare
Choose a tag to compare

New features

  • JSON Pointer implementation

  • JSON Patch implementation, includes patch and diff

  • json::insert function for array that inserts values from range [first, last) before pos.

Bug fixes

  • Fixed issue with serialization of json array of objects to csv file

Changes (non breaking)

  • The member function name json::dump_body has been deprecated and replaced with json::dump_fragment.

  • The non member function name dump_body has been deprecated and replaced with dump_fragment.

  • The class name rename_name_filter has been deprecated and replaced with rename_object_member_filter.

  • In the documentation and examples, the existing function json::insert_or_assign
    is now used instead of the still-supported json::set. The reason is that
    insert_or_assign follows the naming convention of the C++ standard library.

Changes

  • The recently introduced class json_stream_traits has been renamed to serialization_traits

  • Removed template parameter CharT from class basic_parsing_context and renamed it to parsing_context

  • Removed template parameter CharT from class basic_parse_error_handler and renamed it to parse_error_handler

Release 0.99.8.2

30 Aug 16:18
Compare
Choose a tag to compare

0.99.8.2

New features

  • Added json functions push_back and insert for appending values
    to the end of a json array and inserting values at a specifed position

Rationale: While these functions provide the same functionality as the existing
json::add function, they have the advantage of following the naming conventions
of the C++ library, and have been given prominence in the examples and documentation
(add is still supported.)

0.99.8.1

New features

  • cbor extension supports encoding to and decoding from the cbor binary serialization format.

  • json_type_traits supports std::valarray

Documentation

  • Documentation is now in the repository itself. Please see the documentation
    link in the README.md file

Changed

  • Removed CharT template parameter from json_stream_traits

Release 0.99.8

15 Aug 17:39
Compare
Choose a tag to compare

Changes

  • Visual Studio 2013 is no longer supported (jsonpath uses string initilizer lists)

  • json_input_handler overloaded functions value(value,context)have been deprecated. Instead usestring_value(value,context), integer_value(value,context), uinteger_value(value,context), double_value(value,precision,context), bool_value(value,context)andnull_value(context)`

  • json_output_handler overloaded functions value(value)have been deprecated. Instead usestring_value(value), integer_value(value), uinteger_value(value), double_value(value,precision=0), bool_value(value)andnull_value(context)`

  • For consistency, the names jsoncons_ext/msgpack/message_pack.hpp,
    encode_message_pack and decode_message_pack have been deprecated and
    replaced with jsoncons_ext/msgpack/msgpack.hpp, encode_msgpack and decode_msg_pack

Bug fixes

  • Fixed operator== throws when comparing a string against an empty object

  • Fixed jsonpath issue with array 'length' (a.length worked but not a['length'])

  • msgpack extension uses intrinsics for determing whether to swap bytes

New features

  • Stream supported C++ values directly to JSON output, governed by json_stream_traits

  • json::is() and json::as() accept template packs, which they forward to the
    json_type_traits is and as functions. This allows user defined json_type_traits
    implementations to resolve, for instance, a name into a C++ object looked up from a
    registry. See Type Extensibility, Example 2.

  • jsonpath json_query now supports returning normalized paths (with
    optional return_type::path parameter)

  • New jsonpath max and min aggregate functions over numeric values

  • New json::merge function that inserts another json object's key-value pairs
    into a json object, if they don't already exist.

  • New json::merge_or_update function that inserts another json object's key-value
    pairs into a json object, or assigns them if they already exist.