Re: [JSON] Constraining JSON serialization discussion

From: Manu Sporny <msporny@digitalbazaar.com>
Subject: Re: [JSON] Constraining JSON serialization discussion
Date: Fri, 25 Mar 2011 10:38:32 -0500

> On 03/24/2011 11:19 PM, Peter Frederick Patel-Schneider wrote:

[...]

> I do not think the reviver/replacer stuff fits into this category of
> "things we should worry about" yet.

Well, given my current understanding of JSON I would be unhappy if the
WG ever had to worry about them!

[...]

>>> Conformant implementations
>>> are not supposed to change values between serializing and deserializing
>>> (doubles, integers, booleans, etc.).
>>
>> Where did doubles and integers come into the mix?  I thought that JSON
>> only had a single generic numeric, and didn't even have boolean as a
>> syntactic category.
> 
> I want to make sure that we're not conflating the "JSON serialization
> (RFC4627)" with "how the JSON serialization is interpreted in various
> programming languages". I'm talking about the latter, you seem to be
> thinking that I'm talking about the former.
> 
> I can't answer your question until you are more clear about what context
> you would like your question to be answered in - "JSON serialization
> (RFC4627)" or "an implementation of a JSON parser, and a round-trip, in
> programming language X".

Well, I wasn't aware that this was a distinction to be made here.  I
just want to know about JSON!  Of course, if it is good practice not to
have numbers that are too big, then I want to know about it, but this
isn't directly about any particularly programming language, just about
good practice when using JSON.


>>> This is a snag point in some cases
>>> of serializing RDF values to JSON that we'll have to be careful with.
>>> However, we can have that discussion without knowing what the object
>>> model is, or by placing reasonable constraints on the object model if
>>> necessary.
>>
>> OK, but what are these "reasonable" constraints?
> 
> That question is too vague to answer because it lacks context. I could
> say: That is for this WG and the reviewers to decide. Or I could say: A
> reasonable constraint is one that doesn't cause regular JavaScript
> developers to recoil in horror. Neither of those answer your question.

No, but I sure want it answered, and well before the WG generates its
first working drafts!

[...]

> You are asking a "What is the meaning of..." question. Here are a few
> others:
> 
> "What is the meaning of RDF?"
> "What is the meaning of OWL?"
> "What is the meaning of XML?"

None of which require knowing about a programming langauge, even though
the last two are quite complex.

[...]

>> JSON, no more than that!
> 
> Too vague. Exactly what about JSON do you want to know? More about the
> serialization grammar? How it is used by a particular implementation in
> a particular programming language? Why the colon syntax is viewed as
> problematic by some?

All about it, except, of course, how the innards of a particular
implementation goes about parsing JSON, which are irrelevant except in
whether they cause difficulties that can be observed in the use of JSON
itself, and even then I only want to know the observable effects.

[...]

> -- manu

peter

Received on Friday, 25 March 2011 17:11:25 UTC