On 2015-11-15 13:16, Allan Jude wrote:
> On 2015-11-15 13:14, Garrett Cooper wrote:
>>> On Nov 15, 2015, at 10:09, Allan Jude <allanj...@freebsd.org> wrote:
>> ...
>>> The big difference is, a json parser isn't going to blow up if a new
>>> field gets added in the middle, and your awk/grep/sed script probably will.
>> That's a plus to those formats, yes, but if someone changes the field name 
>> (which can happen today, on a whim, and would go unnoticed for a while 
>> because no tests/spec), you'll run into a KeyError in Python or an 
>> equivalent error message in your language of choice.
>> Thanks,
> But, if the same change was made to a pure text output, then our 'column
> 3' would suddenly be username instead of ip address, and your program
> would not work at intended either. so at least json would give you a
> warning.
> So, the need for a spec on the output is not specific to encoded
> outputs, changing the output in text is just as disruptful.

Also, libxo now supports the versioning of output, to make it possible
for your json parser to detect when a change to the schema has been made.

Allan Jude

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to