pjson 1.0.0
A small, owning JSON value for C++11
Loading...
Searching...
No Matches
ByteDance::pjson::PointerError Struct Reference

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. More...

#include <pjson.h>

Public Types

enum  Code {
  Ok , InvalidSyntax , InvalidEscape , MissingTarget ,
  ExpectedContainer , InvalidArrayIndex , ArrayIndexOutOfRange , AppendTokenNotAllowed ,
  AllocationFailure , InternalError
}
 Selects one of the public JSON policies. More...
 

Public Member Functions

 PointerError ()
 Public API member PointerError; see the API overview for its contract.
 

Public Attributes

bool ok
 Public API member ok; see the API overview for its contract.
 
Code code
 Public API member code; see the API overview for its contract.
 
std::string pointer
 Public API member pointer; see the API overview for its contract.
 
size_t tokenIndex
 Public API member tokenIndex; see the API overview for its contract.
 
std::string token
 Public API member token; see the API overview for its contract.
 
std::string message
 Public API member message; see the API overview for its contract. / Constructs a successful lookup state with no pointer or token details.
 

Detailed Description

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.

Definition at line 154 of file pjson.h.

Member Enumeration Documentation

◆ Code

Selects one of the public JSON policies.

Enumerator
Ok 

JSON value or policy constant.

InvalidSyntax 

JSON value or policy constant.

InvalidEscape 

JSON value or policy constant.

MissingTarget 

JSON value or policy constant.

ExpectedContainer 

JSON value or policy constant.

InvalidArrayIndex 

JSON value or policy constant.

ArrayIndexOutOfRange 

JSON value or policy constant.

AppendTokenNotAllowed 

JSON value or policy constant.

AllocationFailure 

JSON value or policy constant.

InternalError 

JSON value or policy constant.

Definition at line 156 of file pjson.h.

Constructor & Destructor Documentation

◆ PointerError()

ByteDance::pjson::PointerError::PointerError ( )

Public API member PointerError; see the API overview for its contract.

Member Data Documentation

◆ code

Code ByteDance::pjson::PointerError::code

Public API member code; see the API overview for its contract.

Definition at line 170 of file pjson.h.

◆ message

std::string ByteDance::pjson::PointerError::message

Public API member message; see the API overview for its contract. / Constructs a successful lookup state with no pointer or token details.

Definition at line 174 of file pjson.h.

◆ ok

bool ByteDance::pjson::PointerError::ok

Public API member ok; see the API overview for its contract.

Definition at line 169 of file pjson.h.

◆ pointer

std::string ByteDance::pjson::PointerError::pointer

Public API member pointer; see the API overview for its contract.

Definition at line 171 of file pjson.h.

◆ token

std::string ByteDance::pjson::PointerError::token

Public API member token; see the API overview for its contract.

Definition at line 173 of file pjson.h.

◆ tokenIndex

size_t ByteDance::pjson::PointerError::tokenIndex

Public API member tokenIndex; see the API overview for its contract.

Definition at line 172 of file pjson.h.


The documentation for this struct was generated from the following file: