Open pnelson opened 8 months ago
This looks good to me, and it matches the man pages:
--json=MODE
When used with the call or get-property command, shows output
formatted as JSON. Expects one of "short" (for the shortest
possible output without any redundant whitespace or line
breaks) or "pretty" (for a pretty version of the same, with
indentation and line breaks). Note that transformation from
D-Bus marshalling to JSON is done in a loss-less way, which
means type information is embedded into the JSON object tree.
-j
Equivalent to --json=pretty when invoked interactively from a
terminal. Otherwise equivalent to --json=short, in particular
when the output is piped to some other program.
Some time ago
makoctl mode
mysteriously stopped working for me with ajq
error that seemed to indicate bad JSON content. I finally took some time to debug it and it was because I had setSYSTEMD_COLORS=16
for my user. The-j
flag onbusctl
appears to be sensitive to this. Changing it to--json=short
will ensure the output of that command is always raw.