It looks like libxo does the output in structured format, but what about input? (For chaining commands together with pipes). Did the FreeBsd porting work[1] implement the input side with libxo, independently of libxo, or not at all?
(Not to diminish libxo --it looks pretty cool, and I didn't know about it before-- just curious.)
On the input side, FreeBSD prefers libucl https://github.com/vstakhov/libucl
I don't think input meant configuration file syntax here, but actual
echo $somejson-jobspec | ifconfig
instead of ifconfig em0 inet 192.02.1/24 aliasThat looks very interesting, though I actually think that standardising on the command-line/env variable API is more important than an implementation. It's the moment you can "automagically" "upgrade" a pipe to contain structured data for apps that support it that you get the most value.
But given that it's there, I'll certainly consider it when writing tools, and consider supporting the command-line option/env var even if/when I don't use the implementation...
Look at FreeBsd's libxo. It's supported by most of the base system.