Re:Tips on adding JSON output to your CLI app
by zeroimpl on Monday December 06, 2021 @09:50PM
(#29468642)
You're not wrong, but sometimes simple formats aren't as simple as they look. It sounds like what you want is basically a format like /etc/os-release:
On the surface this seems great, but those quotation marks are kind of annoying. Is it possible there's an escape syntax that's used in case the name also includes quotes? eg VERSION="8.5 (Green \"Aqua\" Obsidian)"? Is it also possible you can embed newlines in between the quotes too? Who knows... Thankfully with JSON there is a simple spec.
[ Parent
| on HN ]
There are no comments on this comment yet.