jfp

Crates.iojfp
lib.rsjfp
version0.1.0
sourcesrc
created_at2022-08-31 21:26:43.218873
updated_at2022-08-31 21:26:43.218873
descriptionA CLI to parse json files, being able to output properties and array indexes
homepage
repositoryhttps://github.com/costa86/jfp
max_upload_size
id655965
size12,624,366
Lorenzo Costa (costa86)

documentation

README

Json File Parser

A CLI to parse json files, being able to output properties and array indexes

1. Instalation

1.1 Cargo

cargo install jfp

1.2 Ready-to-use executable

OS Architecture File*
Linux x86_64 jfp
Windows x86_64 jfp.exe
./jfp

2. Usage

Lorenzo Costa <http://www.costa86.tech>
Json File Parser

USAGE:
    jfp --filename <FILE> --keys <TEXT>

OPTIONS:
    -f, --filename <FILE>    Json file to parse
    -h, --help               Print help information
    -k, --keys <TEXT>        Property to search for. Use '.' for nested properties and/or array
                            indexes
    -V, --version            Print version information

3. Example

the-lord-of-the-rings.json


{
    "title": "the lord of the rings",
    "characters": [
        {
            "name": "frodo",
            "race": "hobbit"
        },
        {
            "name": "aragorn",
            "race": "human"
        }
    ]
}

./jfp -f ./examples/the-lord-of-the-rings.json -k title 
"the lord of the rings"
./jfp -f ./examples/the-lord-of-the-rings.json -k characters.0.race
"hobbit"
Commit count: 1

cargo fmt