|
pjson 2.0.0
A small, owning JSON value for C++11
|
Structured JSON Pointer (RFC 6901) lookup failure. More...
#include <pjson.h>
Public Types | |
| enum | Code { Ok , InvalidSyntax , InvalidEscape , MissingTarget , ExpectedContainer , InvalidArrayIndex , ArrayIndexOutOfRange , AppendTokenNotAllowed , AllocationFailure , InternalError } |
| Stable categories for programmatic JSON Pointer failure handling. More... | |
Public Attributes | |
| bool | ok |
| True exactly when code is Ok. | |
| Code | code |
| Stable machine-readable result category. | |
| std::string | pointer |
| Pointer text supplied by the caller. | |
| size_t | tokenIndex |
| Zero-based index of the failing token. | |
| std::string | token |
| Decoded failing token when available. | |
| std::string | message |
| Human-readable diagnostic; wording is not stable. Constructs a successful lookup state with no pointer or token details. | |
Structured JSON Pointer (RFC 6901) lookup failure.
tokenIndex is zero-based and token is the decoded token that could not be resolved (or the source token when its escape sequence is invalid). std::string reporting overloads reset all fields on entry. A C-string overload can report allocation failure before copying the pointer text.
Stable categories for programmatic JSON Pointer failure handling.
| Code ByteDance::pjson::PointerError::code |
| std::string ByteDance::pjson::PointerError::message |
| bool ByteDance::pjson::PointerError::ok |
| std::string ByteDance::pjson::PointerError::pointer |
| std::string ByteDance::pjson::PointerError::token |
| size_t ByteDance::pjson::PointerError::tokenIndex |