|
pjson 2.0.0
A small, owning JSON value for C++11
|
Structured JSON Patch (RFC 6902) / Merge Patch (RFC 7396) failure. More...
#include <pjson.h>
Public Types | |
| enum | Code { Ok , InvalidPatchDocument , OperationNotObject , MissingOp , MissingPath , MissingFrom , MissingValue , InvalidOp , InvalidPath , InvalidFrom , TargetMissing , InvalidArrayIndex , ArrayIndexOutOfRange , MoveRootNotAllowed , MoveIntoDescendant , TestFailed , ResourceLimit , AllocationFailure , InternalError } |
| Stable categories for programmatic JSON Patch failure handling. More... | |
Public Attributes | |
| bool | ok |
| True exactly when code is Ok. | |
| Code | code |
| Stable machine-readable result category. | |
| size_t | opIndex |
| Zero-based index of the failing operation. | |
| std::string | op |
| Operation name when available. | |
| std::string | path |
| Destination pointer when available. | |
| std::string | from |
| Source pointer when available. | |
| size_t | tokenIndex |
| Zero-based index of the failing pointer token. | |
| std::string | token |
| Decoded failing pointer token when available. | |
| std::string | message |
| Human-readable diagnostic; wording is not stable. Constructs a successful patch state with no operation or token details. | |
Structured JSON Patch (RFC 6902) / Merge Patch (RFC 7396) failure.
Patch application is atomic: failure leaves the target unchanged. Reporting patch APIs reset all fields on entry and on success.
Stable categories for programmatic JSON Patch failure handling.
| Code ByteDance::pjson::PatchError::code |
| std::string ByteDance::pjson::PatchError::from |
| std::string ByteDance::pjson::PatchError::message |
| bool ByteDance::pjson::PatchError::ok |
| std::string ByteDance::pjson::PatchError::op |
| size_t ByteDance::pjson::PatchError::opIndex |
| std::string ByteDance::pjson::PatchError::path |
| std::string ByteDance::pjson::PatchError::token |
| size_t ByteDance::pjson::PatchError::tokenIndex |