#[repr(align(8))]pub struct JsonParserConfig {
pub recursion_limit: i32,
pub allow_trailing_commas: bool,
pub allow_comments: bool,
pub allow_unquoted_field_keys: bool,
pub allow_trailing_data: bool,
}
Expand description
Configuration options for the JSON parser.
Fields§
§recursion_limit: i32
Maximum depth of nested structures (objects and arrays) allowed during parsing. Each non-empty object or array counts as one depth layer. Default is 128.
allow_trailing_commas: bool
When enabled, allows trailing commas in arrays and objects. A trailing comma can appear before the closing brace or bracket.
allow_comments: bool
When enabled, allows C-style single-line comments in the JSON. Comments start with two forward slashes (//) and continue to the end of the line.
allow_unquoted_field_keys: bool
When enabled, allows unquoted strings for object keys that correspond to fields of rust types. Unquoted keys must be comprised of characters matching the following [A-Za-z0-9_] and cannot start with a number.
allow_trailing_data: bool
When enabled, allows extra data to appear after the outermost JSON structure.
This is primarily relevant when using the from_json
function rather than
interacting with the parser directly.
Trait Implementations§
Source§impl Clone for JsonParserConfig
impl Clone for JsonParserConfig
Source§fn clone(&self) -> JsonParserConfig
fn clone(&self) -> JsonParserConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more