Releases: danielaparker/jsoncons
Release 0.155.1
0.155.1
Enhancements:
- Improved support for
bson_parser
to switch to array parsing
when the BSON root object is a document butdecode_bson
needs
to convert to anstd::array
,std::tuple
orstd::pair
.
Release 0.155.0
Changes:
- The
semantic_tag
enum valuetimestamp
has been deprecated.
It has been replaced byepoch_second
,epoch_milli
andepoch_nano
.
The deprecatedtimestamp
value has been aliased toepoch_second
.
Enhancements:
-
Allow
bson_parser
to switch to array parsing when the root
object is a document butdecode_bson
expects an array. -
Added
json_type_traits
support forstd::nullptr_t
-
Added
json_type_traits
support forstd::chrono::duration
-
Improved memory efficiency of jmespath extension
-
Added function
json_encode_pretty
as the preferred alternative
to thejson_encode
overload withindenting::indent
argument. -
Added
basic_json
member functiondump_pretty
as the preferred alternative
to thedump
overload withindenting::indent
argument. -
Generalized the
basic_json
member functiondump
and the functionsencode_json
andencode_csv
to write to any back insertable character container. -
Generalized the
basic_json
functionparse
and the functionsdecode_json
anddecode_csv
to read from any contiguous character sequence.
Release 0.154.3
Release 0.154.1
Bugs fixed:
- Fixed issue with encode_cbor overload for user type input and output stream,
#259
Release 0.154.0
Bugs fixed:
- Fixed issue with escaping special characters in the
jsonpath::flatten
function #255 - Added workaround for clang xcode 10 bug in
std::optional
implementation - Fixed bug in
basic_json
less operator with left hand sideuint64_value
and right hand sideint64_value
Changes:
-
The function name
jsonpointer::insert_or_assign
has been deprecated and renamed tojsonpointer::add
.
Rationale: consistency with JSON Patch names. -
Until v0.154.0, the
position()
member function ofser_context
was defined for JSON
name and string events only, and indicated the position of the first character of the
name or string in the input. Since v0.154.0, theposition()
member function ofser_context
is defined for all JSON parse events, and indicates the position of the character at the beginning
of the event, e.g. '[' for an array, '{' for an object, and '"' for a string.
#256
Enhancements
Release 0.153.3
Bug fixes:
-
Fixed a bug in jsonpath array slice when the step component is negative
and the start and stop components are omitted, #252.
jsoncons jsonpath slices now have the same semantics as Python slices
including for negative steps. -
Fixed a bug in jsonpath line/column error reporting when using functions.
Release 0.153.2
Release 0.153.1
Bug fixes for BSON:
- Fixed int32 encoding error in the BSON encoder #243
- Fixed issue with default binary subtype when not specified, was 0, now 0x80 (user defined.)
Release 0.153.0
Bug fixes:
-
Fixed decode issue with
json_type_traits
defined forset
,unordered_set
,multiset
,
unordered_multiset
andforward_list
#242 -
Fixed issue with preserving original CBOR semantic tag for CBOR byte strings
associated with an unknown (to jsoncons) tag.
Enhancements:
-
basic_json::parse
,decode_json
,decode_csv
,decode_bson
,decode_cbor
,
decode_msgpack
, anddecode_ubjson
now support reading data from a pair of
LegacyInputIterators that specify a character or byte sequence. -
byte_string_view
now has an explicit constructor that allows any contiguous
byte sequence container.
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.