Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DA
davenull @programming.dev
Posts 1
Comments 3

JSONPath library that supports returning the real path to nodes as well as their values?

Hey everyone, first time poster, long time lurker.

I've been crawling crates.io trying to find an existing crate that supports using JSONPath to query a document and returns both the selected node, and the actual path to said node.

For example, say I have the following JSON object:

json { "foo": { "bar": { "baz": "hello!" } } } And I query it with $.foo.*.baz, it would return something like:

json { node: "hello!", // Would be something like serde::Value path: "$.foo.bar.baz" }

Does anything like this exist (or is in development) in the rust eco-system today?

Any help would be most appreciated, thank you!

1
Extension to view all files from a folder in a single tab?
  • I can't help but would like to add that this seems like a really really cool idea. It could even be extended to support CTRL+F to search between all the open files, there's a lot of cool possibilites. Just throwing this out here in case it doesn't exist and someone feels motivated to make it.