https://github.com/romnn/serde_json_merge
Merge, index, iterate, and sort a serde_json::Value (recursively).
https://github.com/romnn/serde_json_merge
extension indexing iterators json merge recursively rust serde-json sort
Last synced: about 1 year ago
JSON representation
Merge, index, iterate, and sort a serde_json::Value (recursively).
- Host: GitHub
- URL: https://github.com/romnn/serde_json_merge
- Owner: romnn
- License: mit
- Created: 2022-09-22T10:15:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-08T02:03:57.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T11:44:21.837Z (over 1 year ago)
- Topics: extension, indexing, iterators, json, merge, recursively, rust, serde-json, sort
- Language: Rust
- Homepage: https://romnn.github.io/serde_json_merge/
- Size: 814 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## serde_json_merge
[
](https://github.com/romnn/serde_json_merge/actions/workflows/build.yaml)
[
](https://github.com/romnn/serde_json_merge/actions/workflows/test.yaml)
[
](https://romnn.github.io/serde_json_merge/)
[
](https://crates.io/crates/serde_json_merge)
[
](https://docs.rs/serde_json_merge)
Merge, index, iterate, and sort a `serde_json::Value` (recursively).
This library supports in-place merging and sorting using DFS and BFS traversal.
```toml
[dependencies]
serde_json_merge = "0"
```
#### Usage
For usage examples, check the [examples](https://github.com/romnn/serde_json_merge/tree/main/examples) and [documentation](https://docs.rs/serde_json_merge).
#### Examples
TODO: embed these examples here
```bash
cargo run --example async_fs --features async -- --path ./
cargo run --example sync_fs --features sync,rayon -- --path ./
```
#### Development
```bash
cargo install cargo-criterion
cargo install cargo-feature-combinations
brew install taskfile
# see a list of development tasks such as `test`, `bench`, or `lint`
task --list
```
Benchmark reports are available [here](https://romnn.github.io/serde_json_merge/).
#### Acknowledgements
After I wrote this crate for another project and decided to publish it, I found [json_value_merge](https://crates.io/crates/json_value_merge).
Looking through it, I added `merge_index` inspired by their `merge_in` API.