v3.0.0¶
Released on 2017-12-17.
First 3.x release — a major release with breaking changes (see the migration guide).
- Introduces user-defined exceptions (
json::exceptionand subtypes, each with an identifier). - Adds a non-throwing
acceptfunction and anallow_exceptionsflag forparse, and anupdatefunction to merge objects. - Adds streaming for CBOR and MessagePack and allows storing NaN/infinity.
- Non-UTF-8 strings now throw on serialization, and the iterator category changed to bidirectional.
API changes¶
Added (9 pages):
basic_json:accept,exception,invalid_iterator,object_comparator_t,other_error,out_of_range,parse_error,type_error,update
Changed:
operator<<(basic_json), nlohmann::operator<<(json_pointer): Overload 1: Added support for indentation character and deprecatedstd::ostream& operator>>(const basic_json& j, std::ostream& o)in version 3.0.0.basic_json::dump: Indentation characterindent_char, optionensure_asciiand exceptions added in version 3.0.0.basic_json::from_cbor: Changed to consume input adapters, removedstart_indexparameter, and addedstrictparameter in version 3.0.0.basic_json::from_msgpack: Changed to consume input adapters, removedstart_indexparameter, and addedstrictparameter in version 3.0.0.basic_json::insert: Overload 5 added.basic_json::type_name: Changed return value toconst char*and addednoexceptin version 3.0.0.