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

Bounds parsing work and selects duplicate-key and number policies. More...

#include <pjson_parser.h>

Public Types

enum  DuplicateKeyPolicy { RejectDuplicateKeys , KeepFirstDuplicate , KeepLastDuplicate }
 Controls how repeated object member names are handled. More...
 
enum  NumberPolicy { RejectUnrepresentableNumbers , AllowLossyNumbers }
 Controls numeric tokens that cannot be represented exactly. More...
 

Public Attributes

int maxDepth
 Nesting limit; non-positive means one level.
 
size_t maxNodes
 Maximum values processed; zero is unlimited.
 
size_t maxInputBytes
 Maximum input bytes; zero is unlimited.
 
DuplicateKeyPolicy duplicateKeys
 Duplicate object-name policy.
 
NumberPolicy numberPolicy
 Unrepresentable-number policy. Selects strict defaults and bounded parser resources.
 

Detailed Description

Bounds parsing work and selects duplicate-key and number policies.

Definition at line 18 of file pjson_parser.h.

Member Enumeration Documentation

◆ DuplicateKeyPolicy

Controls how repeated object member names are handled.

Enumerator
RejectDuplicateKeys 

Fail when a name occurs more than once.

KeepFirstDuplicate 

Retain the first value and discard later values.

KeepLastDuplicate 

Replace an earlier value with the last value.

Definition at line 20 of file pjson_parser.h.

◆ NumberPolicy

Controls numeric tokens that cannot be represented exactly.

Enumerator
RejectUnrepresentableNumbers 

Reject range overflow and nonzero underflow.

AllowLossyNumbers 

Store the nearest finite double when possible.

Definition at line 26 of file pjson_parser.h.

Member Data Documentation

◆ duplicateKeys

DuplicateKeyPolicy ByteDance::pJsonParser::Options::duplicateKeys

Duplicate object-name policy.

Definition at line 34 of file pjson_parser.h.

◆ maxDepth

int ByteDance::pJsonParser::Options::maxDepth

Nesting limit; non-positive means one level.

Definition at line 31 of file pjson_parser.h.

◆ maxInputBytes

size_t ByteDance::pJsonParser::Options::maxInputBytes

Maximum input bytes; zero is unlimited.

Definition at line 33 of file pjson_parser.h.

◆ maxNodes

size_t ByteDance::pJsonParser::Options::maxNodes

Maximum values processed; zero is unlimited.

Definition at line 32 of file pjson_parser.h.

◆ numberPolicy

NumberPolicy ByteDance::pJsonParser::Options::numberPolicy

Unrepresentable-number policy. Selects strict defaults and bounded parser resources.

Definition at line 35 of file pjson_parser.h.


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