json_walk

Crates.iojson_walk
lib.rsjson_walk
version0.1.0
created_at2025-10-12 14:52:32.059777+00
updated_at2025-10-12 14:52:32.059777+00
descriptionAccess values in your JSON data using string paths (e.g. "result.item[0].value").
homepagehttps://github.com/j-p-d-e-v/json-walk
repositoryhttps://github.com/j-p-d-e-v/json-walk
max_upload_size
id1879380
size17,176
JP (jpmateo022)

documentation

https://docs.rs/json_walk

README

JSON Walk

Access values in your JSON data using string paths (e.g. "result.item[0].value").

Installing

cargo add json_walk

Example:

use json_walk::{
    file_handler::FileHandler,
    json_walk
};
use serde_json::Value;
let data = FileHandler::load("storage/test-data/data.json").unwrap();
let walker = json_walk(data);

let result = walker.get("result.item[0].value");
// result.unwrap() -> "apple"

Supported Path Syntax

Pattern Meaning
a.b.c object key access
a[0] array index access
status top-level key
a[0].value array index the key access

TODO

  • Support obj["key"]
  • Support a.value\.1

License

See LICENSE for details.

Commit count: 0

cargo fmt