Skip to content

JSON for Modern C++ version 3.0.1

Compare
Choose a tag to compare
@nlohmann nlohmann released this 29 Dec 19:26
· 2389 commits to develop since this release
ce1dccf

Release date: 2017-12-29
SHA-256: c9b3591f1bb94e723a0cd7be861733a3a555b234ef132be1e9027a0364118c4c

Summary

This release fixes small issues in the implementation of JSON Pointer and JSON Patch. All changes are backward-compatible.

Changes

  • 🐛 The "copy" operation of JSON Patch (RFC 6902) requests that it is an error if the target path points into a non-existing array or object (see #894 for a detailed description). This release fixes the implementation to detect such invalid target paths and throw an exception.
  • 🐛 An array index in a JSON Pointer (RFC 6901) must be an integer. This release fixes the implementation to throw an exception in case invalid array indices such as 10e2 are used.
  • ✅ Added the JSON Patch tests from Byron Ruth and Mike McCabe.
  • 📝 Fixed the documentation of the at(ptr) function with JSON Pointers to list all possible exceptions (see #888).
  • 📝 Updated the container overview documentation (see #883).
  • 🔧 The CMake files now respect the BUILD_TESTING option (see #846, #885)
  • 🚨 Fixed some compiler warnings (see #858, #882).

Deprecated functions

🔥 To unify the interfaces and to improve similarity with the STL, the following functions are deprecated since version 3.0.0 and will be removed in the next major version (i.e., 4.0.0):

Please use friend std::istream& operator>>(std::istream&, basic_json&) and friend operator<<(std::ostream&, const basic_json&) instead.