Crates.io | json-split-aom |
lib.rs | json-split-aom |
version | |
source | src |
created_at | 2023-09-15 18:10:25.586565 |
updated_at | 2024-12-04 14:09:44.938862 |
description | Split a large JSON file containing an array of maps into multiple files |
homepage | |
repository | https://github.com/qtfkwk/json-split-aom |
max_upload_size | |
id | 973855 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
$ json-split-aom -h
Split a large JSON file containing an array of maps into multiple files
Usage: json-split-aom [OPTIONS] -a <JSON_PATH> -i <JSON_PATH> [FILES]...
Arguments:
[FILES]... Input file(s)
Options:
-a <JSON_PATH> Dotted JSON path to an array in the input file
-i <JSON_PATH> Dotted JSON path to the ID in the array element
-p Pretty print output files
-c Allow ID path collisions; still gives warnings but
duplicates will overwrite previous files
-h, --help Print help
-V, --version Print version
---
# Assumptions
* The JSON dotted path keys for array and ID don't have periods.
# Examples
1. Use `json-split-aom -a 'Apple.Banana' -i 'id' file.json` to extract objects
to files named `Apple.Banana-id-ID.json` given a `file.json` with content:
`{"Apple":{"Banana":[{"id":12,...},...]}}`
2. Use `json-split-aom -a 'Apple' -i 'Banana.id' file.json` to extract objects
to files named `Apple-Banana.id-ID.json` given a `file.json` with content:
`{"Apple":[{"Banana":{"id":12,...}},...]}`
3. Use `json-split-aom -a 'Apple.Banana' -i 'Cherry.id' file.json` to extract
objects to files named `Apple.Banana-Cherry.id-ID.json` given a `file.json`
with content: `{"Apple":{"Banana":[{"Cherry":{"id":12,...},...}]}}`
$ json-split-aom -V
json-split-aom 0.2.1