Skip to content

Release 0.98.3.1

Compare
Choose a tag to compare
@danielaparker danielaparker released this 25 Jan 15:08

0.98.3.1

Fixes an issue with object key comparisons introduced in 0.98.3.

0.98.3

New features

Supports Stefan Goessner's JsonPath. See example below and documentation.
json member function find added
json member function count added
json array range accessor elements() added, which supports range-based for loops over json arrays, and replaces begin_elements and end_elements
json object range accessor members() added, which supports range-based for loops over json objects, and replaces begin_members and end_members
New version of json add member function that takes a parameter array_iterator
json member function shrink_to_fit added
API Changes

The json internal representation of signed and unsigned integers has been changed from long long and unsigned long long to int64_t and uint64_t. This should not impact you unless you've implemented your own json_input_handler or json_output_handler, in which case you'll need to change your json_input_handler function signatures

void do_longlong_value(long long value, const basic_parsing_context& context) override
void do_ulonglong_integer_value(unsigned long long value, const basic_parsing_context& context) override

to

void do_integer_value(int64_t value, const basic_parsing_context& context) override
void do_uinteger_value(uint64_t value, const basic_parsing_context& context) override
and your json_output_handler function signatures from

void do_longlong_value(long long value) override
void do_ulonglong_integer_value(unsigned long long value) override
to

void do_integer_value(int64_t value) override
void do_uinteger_value(uint64_t value) override
output_format drops support for floatfield property
Non-beaking API Changes

remove_range has been deprecated, use erase(array_iterator first, array_iterator last) instead
remove has been deprecated, use erase(const std::string& name ) instead
json::parse_string has been renamed to json::parse, parse_string is deprecated but still works
json member functionis_emptyhas been renamed toempty,is_empty` is deprecated but still works. Rationale: consistency with C++ containers
json member functions begin_elements and end_elements have been deprecated, instead use elements().begin() and elements.end()
json member functions begin_members and end_members have been deprecated, instead use members().begin() and members.end()
json member function has_member has been deprecated, instead use count. Rationale: consistency with C++ containers
json member function remove_member has been deprecated, instead use remove. Rationale: only member function left with _element or _member suffix
json_parse_exception renamed to parse_exception, json_parse_exception typedef to parse_exception
json::parse(std::istream& is) renamed to json::parse_stream. json::parse(std::istream is) is deprecated but still works.