Reference

show schema json

Display the JSON schema for the output of the show info and show stat commands.

Description Jump to heading

The show schema json command returns the JSON schema for the show info and show stat commands, both of which can return their output as JSON.

You can use a JSON schema document to aid in parsing the output of those commands. For example, it shows the data type for each field, which might be necessary to know before parsing the JSON.

Examples Jump to heading

Save a copy of the JSON schema to a file named schema.json:

bash
echo "show schema json" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
python3 -m json.tool > schema.json
bash
echo "show schema json" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
python3 -m json.tool > schema.json

See also Jump to heading

If this page was useful, please, Leave the feedback.