Streamson Lib
Rust library to handle large JSONs.
Note that it doesn't fully validates whether the input JSON is valid. This means that invalid JSONs might pass without an error.
Trigger strategy
It doesn't actually perform parses json into data. It just takes JSON parts and triggers handlers when a path is matched.
Filter strategy
It actually alters the JSON. If the path is matched the matched part should be removed from output json.
Extract strategy
Only extracts matched data, nothing else.
Convert strategy
Alters the JSON by calling convert functions to matched parts.
Examples
Trigger
use ;
let mut trigger = new;
let handler = new
Filter
use ;
let mut filter = new;
let matcher = Simple.unwrap;
filter.add_matcher;
let mut buffer = ;
while let Ok = input.read
Extract
use ;
let mut extract = new;
let matcher = Simple.unwrap;
extract.add_matcher;
let mut buffer = ;
while let Ok = input.read
Convert
use ;
let mut convert = new;
let matcher = new.unwrap;
convert.add_matcher;
let mut buffer = ;
while let Ok = input.read
Traits
Custom Handlers
You can define your custom handler.
use handler;
...
;
Custom Matchers
You can define custom matchers as well.
use matcher;
;