Crates.io | json-key-remover |
lib.rs | json-key-remover |
version | 0.1.0 |
source | src |
created_at | 2022-08-24 12:24:03.833742 |
updated_at | 2022-08-24 12:24:03.833742 |
description | Remove specific keys from json |
homepage | |
repository | https://github.com/baku4/json-key-remover/ |
max_upload_size | |
id | 651628 |
size | 41,430 |
Remove specific keys from json
# File to file
json-key-remover -i input.json -o output.json -k unnecessary_key
# Pipe to pipe
wget -q -O ${interface} | json-key-remover -k unnecessary_key | head
# Remove multiple keys
json-key-remover -i input.json -o output.json -k key_1,key_2,key_3
Rust
libraryuse json_key_remover::KeyRemover;
// Init
let buffer_size = 64*1024;
let keys_to_remove = vec!["key_1".to_string(), "key_2".to_string()];
let mut key_remover = KeyRemover::init(buffer_size, keys_to_remove);
// Run
key_remover.process(reader, writer);
cargo
cargo build --release