Struct jsonl_converter::processors::line_processor::LineProcessor
source · pub struct LineProcessor {
pub bracket_stack: BracketStack,
pub jsonl_string: JSONLString,
}
Fields§
§bracket_stack: BracketStack
§jsonl_string: JSONLString
Implementations§
source§impl LineProcessor
impl LineProcessor
sourcepub fn push_bracket(&mut self, byte: &char)
pub fn push_bracket(&mut self, byte: &char)
sourcepub fn process_line(&mut self, line: &str)
pub fn process_line(&mut self, line: &str)
Processes a line of a file. Whilst processing the line, it checks if their are any brackets. Keeping a track of the brackets allows it to determine when a JSON object has been fully read. If the JSON object has been fully read, then the JSON object is printed to stdout.
Arguments
line
- A line of a file.