Releases: danielaparker/jsoncons
Release 0.102.1
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
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
0.101.0
Fixes:
- Fixes to
string_view
code whenJSONCONS_HAS_STRING_VIEW
is defined injsoncons_config.hpp
Changes:
as_double
throws ifjson
value is null (previously returned NaN)
Enhancements:
- Added convenience functions
decode_csv
andencode_csv
- Support custom allocaor (currently stateless only) in
json_decoder
,json_reader
,
csv_reader
,csv_parameters
Release 0.100.2
Resolved warnings on GCC Issue #127
Release 0.100.1
Fix for platform issue with vs2017:
- Renamed label
minus
tominus_sign
injson_parser.hpp
Enhancements:
- New classes
byte_string
andbyte_string_view
, to augment support for cbor byte strings injson
values
Version 0.100.0
Changes:
-
template <class CharT> json_traits<CharT>
replaced withsorted_policy
-
template <class CharT> o_json_traits<CharT>
replaced withpreserve_order_policy
-
The return type for the json::get_with_default function overload for
const char*
has been
changed fromconst char*
tojson::string_view_type
, which is assignable tostd::string
. -
New functions
byte_string_value
anddo_byte_string_value
have been added to
basic_json_input_handler
andbasic_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 tostrtold_l
Enhancements:
-
The
json
class and thedecode_cbor
andencode_cbor
functions now support byte strings
Ajson
byte string value will, when serialized to JSON, be converted to a base64url string. -
version.hpp
added toinclude
directory
0.99.9.2
Bug fixes:
- Fixed issue with jsonpatch::diff (fix contributed by Alexander (rog13))
Enhancements:
- New class
cbor_view
for accessing packedcbor
values. Acbor_view
satisfies the requirements forjsonpointer::get
.
Release 0.99.9.1
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 withjson::dump_fragment
. -
The non member function name
dump_body
has been deprecated and replaced withdump_fragment
. -
The class name
rename_name_filter
has been deprecated and replaced withrename_object_member_filter
. -
In the documentation and examples, the existing function
json::insert_or_assign
is now used instead of the still-supportedjson::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 toserialization_traits
-
Removed template parameter
CharT
from classbasic_parsing_context
and renamed it toparsing_context
-
Removed template parameter
CharT
from classbasic_parse_error_handler
and renamed it toparse_error_handler
Release 0.99.8.2
0.99.8.2
New features
- Added
json
functionspush_back
andinsert
for appending values
to the end of ajson
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
supportsstd::valarray
Documentation
- Documentation is now in the repository itself. Please see the documentation
link in the README.md file
Changed
- Removed
CharT
template parameter fromjson_stream_traits
Release 0.99.8
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 use
string_value(value,context),
integer_value(value,context),
uinteger_value(value,context),
double_value(value,precision,context),
bool_value(value,context)and
null_value(context)` -
json_output_handler
overloaded functions value(value)have been deprecated. Instead use
string_value(value),
integer_value(value),
uinteger_value(value),
double_value(value,precision=0),
bool_value(value)and
null_value(context)` -
For consistency, the names
jsoncons_ext/msgpack/message_pack.hpp
,
encode_message_pack
anddecode_message_pack
have been deprecated and
replaced withjsoncons_ext/msgpack/msgpack.hpp
,encode_msgpack
anddecode_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
andas
functions. This allows user definedjson_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
optionalreturn_type::path
parameter) -
New jsonpath
max
andmin
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.