Overview
This page will describe the optional JSON output format of settingsctl. For ease of later processing, all settingsctl commands accept a--json option. This option causes the information to be outputted in a JSON format instead of a nice-looking human-readable format which can be hard to process in programs.
Example JSON outputs for different commands
set
Forsettingsctl set --json hello.world.example Hello World:
{
"setting": "hello.world.example",
"value": "Hello World",
"value-raw": ["Hello", "World"]
}
where "value" is the validated and formatted version
returned by the setting, and "value-raw" is the raw list of arguments given by the user.
get
Forsettingsctl get --json hello.world.example:
{
"setting": "hello.world.example",
"value": "Hello World"
}
tree
Forsettingsctl tree --json hello:
{
"world/": {
"example": ""
},
"foo/": {
"bar": ""
}
}
info
Forsettingsctl info --json hello.world.example:
{
"setting": "hello.world.example",
"type": ["string"],
"description": "An example setting",
"data": ["Example string"],
"read-only": false
}
list
Forsettingsctl list --json hello:
["world/", "bar/"]
list-all
Forsettingsctl list-all --json hello:
["world", "foo", "bar"]
monitor
Forsettingsctl monitor --json hello:
{"setting": "hello.world.example", "value": "Hello World", "value-raw": ["Hello", "World"]}
{"setting": "hello.foo.bar", "value": "Example", "value-raw": ["Example"]}
