pub struct ParserOptions {
pub allow_comments: bool,
pub allow_trailing_commas: bool,
pub allow_unquoted_keys: bool,
pub allow_single_quotes: bool,
pub implicit_top_level: bool,
pub newline_as_comma: bool,
pub max_depth: usize,
pub enable_repair: bool,
pub max_repairs: usize,
pub fast_repair: bool,
pub report_repairs: bool,
}Expand description
Configuration options for the vexy_json parser.
These options control which forgiving features are enabled during parsing. By default, all forgiving features are enabled.
Fields§
§allow_comments: boolWhether to allow single-line and multi-line comments.
allow_trailing_commas: boolWhether to allow trailing commas in arrays and objects.
allow_unquoted_keys: boolWhether to allow unquoted object keys (e.g., {key: “value”}).
allow_single_quotes: boolWhether to allow single-quoted strings (e.g., ‘value’).
implicit_top_level: boolWhether to allow implicit top-level objects and arrays.
When enabled, key: value becomes {key: value} and 1, 2, 3 becomes [1, 2, 3].
newline_as_comma: boolWhether to treat newlines as commas in arrays and objects.
max_depth: usizeMaximum nesting depth for objects and arrays to prevent stack overflow.
enable_repair: boolEnable JSON repair functionality for bracket mismatches.
max_repairs: usizeMaximum number of repairs to attempt.
fast_repair: boolPrefer speed over repair quality.
report_repairs: boolReport all repairs made.
Trait Implementations§
Source§impl Clone for ParserOptions
impl Clone for ParserOptions
Source§fn clone(&self) -> ParserOptions
fn clone(&self) -> ParserOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParserOptions
impl Debug for ParserOptions
Source§impl Default for ParserOptions
impl Default for ParserOptions
Source§fn default() -> ParserOptions
fn default() -> ParserOptions
Source§impl<'de> Deserialize<'de> for ParserOptionswhere
ParserOptions: Default,
impl<'de> Deserialize<'de> for ParserOptionswhere
ParserOptions: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ParserOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ParserOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ParserOptions
impl Serialize for ParserOptions
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ParserOptions
impl RefUnwindSafe for ParserOptions
impl Send for ParserOptions
impl Sync for ParserOptions
impl Unpin for ParserOptions
impl UnsafeUnpin for ParserOptions
impl UnwindSafe for ParserOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more