pub struct JsonParser<'a> { /* private fields */ }
Expand description
Internal parser that handles the actual JSON parsing and fixing.
Implementations§
Source§impl<'a> JsonParser<'a>
impl<'a> JsonParser<'a>
Sourcepub fn new(input: &'a str, config: JsonFixerConfig) -> Self
pub fn new(input: &'a str, config: JsonFixerConfig) -> Self
Creates a new parser instance and advances to the first token.
Sourcepub fn parse(&mut self) -> Result<String, JsonFixerError>
pub fn parse(&mut self) -> Result<String, JsonFixerError>
Parses the entire JSON input and returns the fixed JSON string.
Auto Trait Implementations§
impl<'a> Freeze for JsonParser<'a>
impl<'a> RefUnwindSafe for JsonParser<'a>
impl<'a> Send for JsonParser<'a>
impl<'a> Sync for JsonParser<'a>
impl<'a> Unpin for JsonParser<'a>
impl<'a> UnwindSafe for JsonParser<'a>
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
Mutably borrows from an owned value. Read more