Struct streamson_lib::streamer::Streamer [−][src]
pub struct Streamer { /* fields omitted */ }
Reads parts of UTF-8 json input and emits paths e.g. reading of
{
"People": [
{"Height": 180, "Age": 33},
{"Height": 175, "Age": 24}
]
}
should emit (index and path)
Start( 0, ParsedKind::Obj) // Streamer.path == ""
Start( 1, ParsedKind::Arr) // Streamer.path == "{\"People\"}"
Start( 3, ParsedKind::Obj) // Streamer.path == "{\"People\"}[0]"
Start( 4, ParsedKind::Num) // Streamer.path == "{\"People\"}[0]{\"Height\"}"
End( 5, ParsedKind::Num)
Start( 6, ParsedKind::Num) // Streamer.path == "{\"People\"}[0]{\"Age\"}"
End( 7, ParsedKind::Num)
End( 8, ParsedKind::Obj)
Start( 9, ParsedKind::Obj) // Streamer.path == "{\"People\"}[1]"
Start(10, ParsedKind::Num) // Streamer.path == "{\"People\"}[1]{\"Height\"}"
End( 11, ParsedKind::Num)
Start(12, ParsedKind::Num) // Streamer.path == "{\"People\"}[1]{\"Age\"}"
End( 13, ParsedKind::Num)
End( 14, ParsedKind::Obj)
End( 15, ParsedKind::Arr)
End( 16, ParsedKind::Obj)
Implementations
impl Streamer
[src]
impl Streamer
[src]pub fn current_path(&mut self) -> &mut Path
[src]
pub fn current_path(&mut self) -> &mut Path
[src]Returns current path