Crates.io | ssedit |
lib.rs | ssedit |
version | 0.2.0 |
source | src |
created_at | 2023-09-17 03:16:24.455857 |
updated_at | 2023-09-23 09:53:45.391027 |
description | A stream editor for structured data formats like JSON, YAML, and INI that retains all original formatting and will retain original tabs/spaces/line ending formats. |
homepage | https://github.com/chris-tomich/ssedit |
repository | https://github.com/chris-tomich/ssedit |
max_upload_size | |
id | 974817 |
size | 134,995 |
ssedit (Structured Data Stream Editor) is a stream editor for structured data formats that retains all original formatting and will retain original tabs/spaces/line ending formats. At the moment it only supports JSON but in the future it will be extended to support YAML amd INI.
At the moment ssedit only supports input from STDIN.
Here is a simple example using JSON path to reference data in the sample.json file found in the root of this GitHub repo.
$ cat sample.json | ./target/debug/ssedit -q '$.batters.batter[1].type'
Chocolate%
$
Here is a simple example using JSON path to reference array data in the sample.json file found in the root of this GitHub repo. There is currently a bug with traditional JSON path root array referencing so there's been a slight change to the syntax.
$ cat sample2.json | ./target/debug/ssedit -q '$.[0].id'
5001%
$