mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
1.0 KiB
1.0 KiB
jc.parsers.ping
jc - JSON CLI output utility ping Parser
Usage:
specify --ping as the first argument if the piped input is coming from ping
Compatibility:
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
Examples:
$ ping | jc --ping -p
[]
$ ping | jc --ping -p -r
[]
info
info(self, /, *args, **kwargs)
process
process(proc_data)
Final processing to conform to the schema.
Parameters:
proc_data: (dictionary) raw structured data to process
Returns:
List of dictionaries. Structured data with the following schema:
[
{
"ping": string,
"bar": boolean,
"baz": integer
}
]
parse
parse(data, raw=False, quiet=False)
Main text parsing function
Parameters:
data: (string) text data to parse
raw: (boolean) output preprocessed JSON if True
quiet: (boolean) suppress warning messages if True
Returns:
List of dictionaries. Raw or processed structured data.