| Crates.io | jsnpar |
| lib.rs | jsnpar |
| version | 0.1.1 |
| created_at | 2025-12-18 05:02:55.247702+00 |
| updated_at | 2025-12-19 23:38:49.241509+00 |
| description | Rust JSON parser implementation using parser combinators. |
| homepage | |
| repository | https://github.com/yarso-su/jsnpar |
| max_upload_size | |
| id | 1991739 |
| size | 21,255 |
Rust JSON parser implementation using parser combinators.
[!NOTE] Educational Project: This is a learning project and not recommended for production use. For production, use serde_json.
As I'm learning Rust, I decided to write a minimal JSON parser using parser combinators. This is not intended to be used in production, but rather as a learning exercise. Although I plan to iterate until I achieve a more robust implementation, I'm open to suggestions and contributions.
I created this crate thanks to Bodil's article on parser combinators. I highly recommend checking it out.
cargo add jsnpar
let json = r#"{"name": "yarso", "awesome": true}"#;
let result = jsnpar::parse(json);
if let Ok(jsnpar::JsonValue::Object(map)) = result {
println!("{:?}", map);
}
This is a custom implementation tailored to my own needs, so there is plenty of room for improvement.
Feel free to fork the project, open issues, or contribute suggestions.
String)For production use, consider these battle-tested alternatives:
This is primarily a learning project, but contributions are welcome! Feel free to:
Built with:
MIT License