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

For settingsctl 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

For settingsctl get --json hello.world.example:

{
    "setting": "hello.world.example",
	"value": "Hello World"
}
			

tree

For settingsctl tree --json hello:

{
	"world/": {
	    "example": ""
	},

	"foo/": {
	    "bar": ""
	}
}
			

info

For settingsctl info --json hello.world.example:

{
	"setting": "hello.world.example",
    "type": ["string"],
	"description": "An example setting",
	"data": ["Example string"],
	"read-only": false
}
			

list

For settingsctl list --json hello:

["world/", "bar/"]
			

list-all

For settingsctl list-all --json hello:

["world", "foo", "bar"]
			

monitor

For settingsctl monitor --json hello:

{"setting": "hello.world.example", "value": "Hello World", "value-raw": ["Hello", "World"]}
{"setting": "hello.foo.bar", "value": "Example", "value-raw": ["Example"]}