SPath: Query expressions for semi-structured data
Overview
You can use it as a drop-in replacement for JSONPath, but also for other semi-structured data formats like TOML or user-defined variants.
Documentation
Example
Here is a quick example that shows how to use the spath crate to query JSONPath alike expression over JSON data:
use json;
use SPath;
Usage
spath is on crates.io and can be used by adding spath to your dependencies in your project's Cargo.toml. Or more simply, just run cargo add spath.
License
This project is licensed under Apache License, Version 2.0.
History
From 0.3.0, this crate is reimplemented as a fork of serde_json_path, with modifications:
- Support other semi-structured data values
- Rewrite the parser with winnow + logos
- Redesign the function registry
impl Ord for PathElement- Drop Integer wrapper (although it's a MUST in RFC 9535, I don't find the reason and highly suspect it's because JSON has only numbers (IEEE 754 float))
- Drop serde related impls.