mirror of
https://github.com/nlohmann/json.git
synced 2026-10-30 01:25:41 +00:00
docs: correct JSON Pointer documentation and add tests (#5937)
Fix inaccurate or missing statements about unflatten (third round-trip failure, empty token, typo), value (type_error.306 before pointer lookup), contains (pointer overload), parent_pointer and operator<< (bad_alloc), out_of_range.410 example, template parameter requirements (resize(n)), and document the URI fragment form and non-unique member names of RFC 6901. Add tests for the unflatten and value() cases. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
8679c011db
commit
c20b6eddf4
9 files changed
+94
-10
No files matched your search
@@ -12,7 +12,8 @@ Parent of this JSON pointer; in case this JSON pointer is the root, the root its
|
||||
|
||||
## Exception safety
|
||||
|
||||
No-throw guarantee: this function never throws exceptions.
|
||||
Strong exception safety: if an exception occurs, the original value stays intact. The function is not `#!cpp noexcept`
|
||||
and allocates a new JSON pointer, so it can throw `#!cpp std::bad_alloc`; it throws no library exceptions.
|
||||
|
||||
## Complexity
|
||||
|
||||
|
||||
Reference in new issue
Block a user