Releases: danielaparker/jsoncons
Release 0.152.0
Bug fixes:
-
Fixed compile error when building with Android SDK level less than 21 #240
-
Fixed bson encode/decode of binary type (wasn't reading/writing subtype.)
Changes:
-
basic_json_compressed_encoder
has been deprecated and renamed to
basic_compact_json_encoder
. Rationale: consistency with other names.
The typedefsjson_compressed_stream_encoder
,wjson_compressed_stream_encoder
,
json_compressed_string_encoder
, andwjson_compressed_string_encoder
have
been deprecated and renamed tocompact_json_stream_encoder
,
compact_wjson_stream_encoder
,compact_json_string_encoder
, and
compact_wjson_string_encoder
. -
The factory function
make_array_iterator()
has been replaced bystaj_array()
. -
The factory function
make_object_iterator()
has been replaced bystaj_object()
. -
The constructors for
json_cursor
,csv_cursor
,bson_cursor
,cbor_cursor
,msgpack_cursor
, andubjson_cursor
that take a filter argument have been deprecated. Instead filters may be applied to a cursor using the pipe syntax, e.g.json_cursor cursor(is);
auto filtered_c = cursor | filter1 | filter2;
Enhancements:
-
Generalized
basic_json(byte_string_arg_t, ...
constructor to accomodate any contiguous byte sequence container,
which is a contiguous container that has member functionsdata()
andsize()
, and member typevalue_type
with size exactly 8 bits.
Any of the values typesint8_t
,uint8_t
,char
,unsigned char
andstd::byte
(since C++17) are allowed. -
Generalized the functions
decode_bson
,decode_cbor
,decode_msgpack
anddecode_ubjson
to read from any contiguous byte sequence. -
Generalized the
json_visitor
member functionbyte_string_value
to accept any contiguous byte sequence argument. In particular this means thatbyte_string_value
can be called on an encoder with any bytes sequence argument. -
Generalized the functions
encode_bson
,encode_cbor
,encode_msgpack
andencode_ubjson
to write to any back insertable byte container.
Any of the values typesint8_t
,uint8_t
,char
,unsigned char
andstd::byte
(since C++17) are allowed. -
Generalized the
json_type_traits
for maps to accomodate all key types
that themselves have json_type_traits defined #241 -
Unknown CBOR tags preceding a byte string (unknown to jsoncons),
MessagePack types associated with the MessagePack ext family,
and bson binary subtypes associated with a binary value are now captured. -
If in
basic_json
tag()
==semantic_tag::ext
, the functionext_tag()
will return a format
specific tag associated with a byte string value. -
The
basic_json
constructor with parameterbyte_string_arg_t
now allows constructing a byte string
associated with a format specific tag.
Release 0.151.1
Bug fixes:
- Fixed
jsoncons::semantic_tag::uri
,jsoncons::semantic_tag::base64
andjsoncons::semantic_tag::base64url
applied to text strings incorrectly encoded into CBOR \238
Release 0.151.0
Bug fixes:
-
Fixed eternal loop in csv parser #220
-
Fixed JSONPath issue with filter expressions containing regular expressions #233
-
Fixed OSS-Fuzz failed throw issue in CSV parser #232
-
Fixed OSS-Fuzz integer-overflow issue in CSV parser #231
-
Fixed OSS-Fuzz timeout issues #230
-
Fixed UBJSON issue parsing arrays with end markers #229
-
Fixed OSS-Fuzz memory allocation issues #228
-
Fixed OSS-Fuzz stack overflow issues #225
-
OSS-Fuzz failed throw issue in CBOR parser #235
-
Msg pack bin8 wrong format #237
Changes:
-
The cbor_option name
enable_typed_arrays
has been deprecated and
renamed touse_typed_arrays
. -
jsonpointer::unflatten_method
has been deprecated and replaced withjsonpointer::unflatten_options
. -
The cursor functions named
read
have been deprecated and renamed toread_to
.
Enhancements:
-
Added classes bson_options, msgpack_options, and ubjson_options
-
Until this release, only JSON parsing supported a
max_nesting_depth
option. Since this release,
JSON, BSON, CBOR, MessagePack and UBJSON all support amax_nesting_depth
option for both
parsing and serializing. The default is 1024. -
UBJSON supports a
max_items
option for parsing and serializing. The default is 16,777,216.
Release 0.150.0
Defects fixed:
-
Fixed jsonpath issue union with spaces
-
Fixed jsonpath issue Bracket notation with empty string
-
Fixed jsonpath issue Bracket notation with empty string doubled quoted
Changes:
-
The names
basic_json_content_handler
andbasic_default_json_content_handler
have been deprecated and renamed tobasic_json_visitor
andbasic_default_json_visitor
.
The private visitor functionsdo_xxx
have been renamed tovisit_xxx
.
This change should be transparent to most users. -
The name
staj_event_type::name
has been deprecated and renamed to
staj_event_type::key
. Rationale: consistency with other names. The old
name is still supported. -
The class
null_ser_context
has been deprecated. For defaults,ser_context()
is now used in place ofnull_ser_context()
.
Enhancements:
- Added jsonpointer
unflatten
function
Release 0.149.0
Defects fixed:
- Fixed vs issue (since v0.148.0) with basic_json constructor disambiguation with
a combination of type tag andstd::initializer_list
arguments.
Non-breaking change:
- For consistency with naming conventions across
json_type_traits
convenience macros,
macro names containingGETTER_CTOR
now containCTOR_GETTER
, e.g.
JSONCONS_ALL_GETTER_CTOR_NAME_TRAITS
is nowJSONCONS_ALL_CTOR_GETTER_NAME_TRAITS
.
The old names are still supported.
Enhancements:
- Added jsonpath functions
flatten
andunflatten
that flatten a json object or array
to a single depth object of key-value pairs, and unflatten that object back to the original json.
Release 0.148.0
Changes:
-
The
json_type_traits
convenience macro names ending inNAMED_TRAITS
have been deprecated and now end inNAME_TRAITS
, e.g. the old name
JSONCONS_ALL_GETTER_SETTER_NAMED_TRAITS
is nowJSONCONS_ALL_GETTER_SETTER_NAME_TRAITS
.
Rationale: name consistency. -
Fixed some deprecated
json_type_traits
convenience macro names. All
of the convenience macro names that have ever been deprecated should work.
Enhancements:
- Added overload with leading
temp_allocator_arg_t
parameter toencode_json
,encode_bson
,encode_csv
,
encode_cbor
,encode_msgpack
andencode_ubjson
, which allows the user to supply a custom allocator
that serialization will use for temporary work areas.
Release 0.147.0
Fixed bugs:
- Fixed an issue with the
jsonpatch_error
class implementation ofwhat()
, likely related to
issue #212
Enhancements:
-
Added support to the convenience macros
JSONCONS_N_GETTER_CTOR_TRAITS
andJSONCONS_ALL_GETTER_CTOR_NAMED_TRAITS
for-non mandatory members to be omitted altogether from the serialized JSON. These macros had been overlooked when this feature was added to the_N_
macros in v0.146.0. -
Added jsonpointer function
flatten
to flatten a json object or array into a single depth object of JSONPointer-value pairs. -
Added overload with leading
temp_allocator_arg_t
parameter todecode_json
,decode_bson
,decode_csv
,
decode_cbor
,decode_msgpack
anddecode_ubjson
, which allows the user to supply a custom allocator
that deserialization will use for temporary work areas.
Release 0.146.1
Fixed issue with json_type_traits
specializations of std::shared_ptr<T>
and
std::unique_ptr<T>
when converting from JSON null.
Release 0.146.0
Changes:
-
The name
rename_object_member_filter
has been deprecated and renamed to
rename_object_key_filter
-
The
json_content_handler
public functionname
has been deprecated and renamed tokey
.
Rationale: in the future we'll likely support overloads for non-string keys for binary formats -
The
json_content_handler
private virtual functiondo_name
has been removed and replaced withdo_key
.
Rationale: in the future we'll likely support overloads for non-string keys for binary formats
Enhancements:
-
New json_type_traits specialization for
std::shared_ptr<T>
forT
that is not a polymorphic class,
i.e., does not have any virtual functions -
New json_type_traits specialization for
std::unique_ptr<T>
forT
that is not a polymorphic class -
For the
_N_
convenience macros that allow some non-mandatory members, the generated
traitsto_json
function will exclude altogether empty values forstd::shared_ptr
andstd::unique_ptr
non-mandatory members, as they do currently forstd::optional
.
Release 0.145.2
v0.145.2
Defect fixes:
- Fixed issue with
json_type_traits
specialization for optional
v0.145.1
Bug fixes:
- Fixed issue with jsoncons::optional
v0.145.0
Bug fixes:
Name changes:
- The
json_type_traits
convenience macro names ending in_DECL
have been shortened
by dropping the_DECL
suffix, e.g. the old nameJSONCONS_N_MEMBER_TRAITS_DECL
is now
JSONCONS_N_MEMBER_TRAITS
. The old names are still supported.
Enhancements:
-
Includes
json_type_traits
specialization forstd::optional
if C++ 17.nullopt
values
are mapped to JSON null values. -
When encoding to JSON, the
json_type_traits
convenience macros will exlude altogether a non-mandatory
std::optional
nullopt
value from the JSON output.