1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

document schema

This commit is contained in:
Kelly Brazil
2019-11-04 13:05:56 -08:00
parent d8b3b59fae
commit a855344bec

View File

@ -80,6 +80,19 @@ $ arp -a | jc --arp -p -r
def process(proc_data):
'''schema:
[
{
"name": string,
"address": string,
"hwtype": string,
"hwaddress": string,
"flags_mask": string,
"iface": string
}
]
'''
# in BSD style, change name to null if it is a question mark
for entry in proc_data:
if 'name' in entry and entry['name'] == '?':