Release date: 2021-08-17
 SHA-256: 230f3a03cefd586661ebab577a347c973d97a770afb89e22c52abc3c2a19d0a7 (json.hpp), b5e3bfad07feba218a26a4f809fbb0d1e3345

nlohmann / json

submited by
Style Pass
2021-08-18 06:30:06

Release date: 2021-08-17 SHA-256: 230f3a03cefd586661ebab577a347c973d97a770afb89e22c52abc3c2a19d0a7 (json.hpp), b5e3bfad07feba218a26a4f809fbb0d1e33450524bf5d7244cabc92cf8178c69 (include.zip)

JSON for Modern C++ 3.10.0 is the first release for over a year. It contains some new features and a lot of minor changes and bug fixes.

Most notably, it introduces extended diagnostics. By defining JSON_DIAGNOSTICS before including the json.hpp, a JSON Pointer is added to exceptions which helps to debug issues with object access, array indices, or mismatching types.

Another important change behind the curtains is a fully overworked CI which performs a lot of checks for every commit which should allow more frequent releases in the future.

Add extended diagnostics information by adding a JSON Pointer to the exception messages indicating the exact location of a invalid type errors or out-of-bound errors.

Exceptions in the library are thrown in the local context of the JSON value they are detected. This makes detailed diagnostics messages, and hence debugging, difficult. To create better diagnostics messages, each JSON value needs a pointer to its parent value such that a global context (i.e., a path from the root value to the value that lead to the exception) can be created. That global context is then provided as a JSON Pointer.

Leave a Comment
Related Posts