Actson

Actson is a reactive JSON parser (sometimes referred to as non-blocking or asynchronous). It is event-based and can be used in asynchronous code (for example in combination with Tokio).
Why another JSON parser?
- Non-blocking. Other JSON parsers use blocking I/O. If you want to develop a reactive application you should use non-blocking I/O (see the Reactive Manifesto).
- Big Data. Most parsers read the full JSON text into memory to map it to a struct, for example. Actson can handle arbitrarily large JSON text. It is event-based and can be used for streaming.
- GeoRocket. Actson was primarily developed for the GeoJSON support support in GeoRocket, a high-performance reactive data store for geospatial files.
Usage
use ;
use ;
let json = r#"{"name": "Elvis"}"#.as_bytes;
let mut feeder = new;
let mut parser = new;
let mut i: usize = 0;
loop
Other languages
Besides this implementation in Rust here, there is a Java implementation.
Acknowledgments
The event-based parser code and the JSON files used for testing are largely based on the file JSON_checker.c and the JSON test suite from JSON.org originally released under this license (basically MIT license).
License
Actson is released under the MIT license. See the LICENSE file for more information.