Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 2014 01:45:24 -0700
From:      Stephen Hurd <shurd@sasktel.net>
To:        gahr@FreeBSD.org, Stephen Hurd <shurd@FreeBSD.org>
Cc:        Jordan Hubbard <jkh@mail.turbofuzz.com>, arch@FreeBSD.org
Subject:   Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Message-ID:  <53D75F24.6090507@sasktel.net>
In-Reply-To: <20140729075640.GB76693@ptrcrt.ch>
References:  <20140725044921.9F0D3580A2@chaos.jnpr.net> <CAETOPp13H7kyLy-1VJRDOsDbOh8A1MWZDxw1xHUBsxTRtMfc7g@mail.gmail.com> <20140728054217.AC1A0580A2@chaos.jnpr.net> <20140728055336.GJ50802@ivaldir.etoilebsd.net> <CAETOPp3hJB8Gj%2BPMj3N951krnNqCYiAOY-cPHxMCBy1CQXWJaQ@mail.gmail.com> <A1E63A7A-BB38-4CC3-B5EC-B251BE990572@mail.turbofuzz.com> <53D73796.9060102@FreeBSD.org> <20140729075640.GB76693@ptrcrt.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Pietro Cerutti wrote:
> On 2014-Jul-28, 22:56, Stephen Hurd wrote:
>> Jordan Hubbard wrote:
>>> Is there some reason JSON is not sufficient?  I think that’s a better question to ask, since the conversation otherwise quickly tends to sound a little like “I’ll accept any single unified format as long as it’s the specific one I like!” :)   I think the greater good argument would suggest just picking one that’s expressive enough (roll a pair of dice), put on your bikeshed-proof sunglasses, and proceed.
>>
>> The biggest problem I tend to have with JSON is that there is no comment
>> format.  I rarely update a configuration without adding a comment
>> regarding it, and since JSON doesn't have comments, it's simply a
>> non-starter for most of my usage.  The whole "just a key that you know
>> isn't real" hack is terrible.
> 
> There's an interesting post about whether this really is a problem:
> 
> https://groups.yahoo.com/neo/groups/json/conversations/topics/156
> 
> I'm not saying it isn't, just that there are reasons why comments are
> not part of JSON.
> 

Yep, program to program formats obviously don't need comments, comments
are for something that a human is modifying on an infrequent basis.  But
invariably, a serialization format designed to be human readable ends up
getting used as a configuration format... and my config files need
comments to ensure that future me hasn't forgotten the lessons that
present me has learnt.

As for comments being "the most difficult feature to support", I find
that hard to believe... I don't see how it could possibly be more
difficult than string support with escaping - especially for the "to end
of line" style comment.  As for "removing comments aligns JSON more
closely with YAML" could be trivially solved by supporting YAML style
comments.

The first reason is fine, and while I don't agree with the fourth
reason, I can accept it.  But really, the ship has sailed, JSON doesn't
have comments, and that's the biggest problem I have with JSON.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iQF8BAEBCgBmBQJT118kXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDQTUyMTJFRTc2MEFCQ0FBMEQ1RTI5NzRC
M0I1QTFCNDk4Q0U1Q0QwAAoJELO1obSYzlzQgc8H/R79tqlzQpjY0jLpwNwUaSgH
M5lroa4f4KEpvRqLKRj0Owt/N+rHzXjPL/mmD6XGckGb3JG0HbEmofq2rz/XoUSI
mksGLsdGkpN4eQppKaAU+mNAPObLoX6KZA51dbNlE6NzFcJirigWfHqUghOZt0X3
xKAWk86YcUvQZ4uYSU7jrkWVpoQeOg2UcSQ3AVvn+cVrYahN3w+r8ypgudd3IcAY
cI0zoTp2w/oiq3mmECdboNFsaZmKlhvXaj0sKrtSlLVHIkPYqzP+2o3QgT96ovHV
0R64R+mg4czpimNcQUrUai3pX5uazwnUSdXy4TnWzYE9IYS33vZjUOqA7wavuDE=
=EaXN
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53D75F24.6090507>