Important
WIP
This is a work in progress and is not yet ready for use (and may never be).
(Educational and recreational) Implementation of a simple JSON parser in Rust.
cargo run -- [FILE]
or compile with
cargo build
and then
./target/debug/json_parser [FILE]
or put the binary in your path and use it as a command line tool.
cp ./target/debug/json_parser /usr/local/bin
json_parser [FILE]
For the following JSON file :
{
"key": "value",
"key-n": 101,
"key-b": true,
"key-o": {
"inner key": "inner value"
},
"key-l": ["list value"]
}
the output will be :
JsonObject of size 5 {
Key: key, Value: String: "value"
Key: key-n, Value: Number: 101
Key: key-b, Value: Boolean: true
Key: key-o, Value: JsonObject of size 1 {
Key: inner key, Value: String: "inner value"
}
Key: key-l, Value: JsonArray of size 1 [
String: "list value"
]
}
Any remarks or suggestions are very welcome, feel free to open an issue or a pull request.