Draft PEP on RSON configuration file format

Patrick Maupin pmaupin at gmail.com
Tue Mar 2 01:56:46 CET 2010


On Mar 1, 5:57 pm, Erik Max Francis <m... at alcyone.com> wrote:
> Patrick Maupin wrote:
> This not only seriously stretching the meaning of the term "superset"
> (as Python is most definitely not even remotely a superset of JSON), but

Well, you are entitled to that opinion, but seriously, if I take valid
JSON, replace unquoted true with True, unquoted false with False,
replace unquoted null with None, and take the quoted strings and
replace occurrences of \uXXXX with the appropriate unicode, then I do,
in fact, have valid Python.  But don't take my word for it -- try it
out!

But if you really want to be pedantic about it, JavaScript (rather
than Python) is, in fact a superset of JSON, and, despite the
disparagement JavaScript receives, in my opinion, it is possible to
write much better looking JavaScript than JSON for many tasks.

YAML, also, is a superset of JSON, and IMO, it is possible to write
much better looking YAML than JSON.

> still doesn't address the question.  Is RSON and _actual_ superset of
> JSON, or are you just misusing the term there, as well?

Yes, the RSON definition, in fact, a superset of JSON, just like the
YAML definition.  But RSON is a much smaller grammar than YAML.

  If it is, then
> your rationale for not using JSON makes no sense if you're making a new
> format that's merely a superset of it.  Obviously JSON can't be that
> unreadable if you're _extending_ it to make your own "more readable"
> format.  If JSON is unreadable, so must be RSON.

Well, we'll have to agree to disagree here.  Bearing in mind that the
definition of "unreadable" depends on the target application and user,
obviously, it will be *possible* to write unreadable RSON, just as it
is *possible* to write unreadable JavaScript or Python or YAML, but it
will be *possible* to write better looking RSON than is possible to
achieve with JSON, just as it is *possible* to write better looking
JavaScript or YAML or Python than it is *possible* to achieve with
pure JSON.

Best regards,
Pat



More information about the Python-list mailing list