json-key-remover 0.1.0

Remove specific keys from json
Documentation
  • Coverage
  • 0%
    0 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 40.96 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.61 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • baku4/json-key-remover
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • baku4

json-key-remover

Remove specific keys from json

Usage

Binary

# 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 library

use 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);

Build

With cargo

cargo build --release