Re: Review of JSON results format document

Some more responses inline...

Kendall Clark wrote on 03/30/2006 12:34:10 PM:

> ACK. 

Thanks for making all those changes, Kendall.

> > "Value" is used for bNode - I know its for consistency but value 
> > for label can be confusing.  It's keyed off of the type anyway.
> 
> I think I'll leave this as-is, for now, as I don't know what to 
> replace it with, and I think the consistency is worth the chance of 
> confusion.

I agree with this; the terminology is strange, but the consistency is 
important. We debated other ways to do it (you could basically just do a 
C-style union), but I think this is best for simple applications (e.g. 
displaying query results, w/o desire to distinguish between 
literals/uris/bnodes).

> > JSON escapes "/" in strings - I don't know why but it does.  I have 
> > always assumed its optional but I can't find text to that effect.
> 
> Yr sparql.org output doesn't escape them, nor does the Python JSON 
> library I've been using... And yet, yr right, the JSON.org doc says 
> that the "/" char is escaped: "\/".

While JSON.org does indeed list "\/" as a valid character, the IETF 
working draft (from February 2006, expires in June 2006), which can be 
found at 
http://www.ietf.org/internet-drafts/draft-crockford-jsonorg-json-04.txt , 
has this to say:

"""
All Unicode characters may be placed within
      the quotation marks except for the characters which must be
      escaped: quotation mark, reverse solidus, and the control
      characters (U+0000 through U+001F).
"""

So while "\/" is a recognized escape sequence, slash (solidus) does not 
seem to require escaping.

> > Which reminds me, http://json.org/ does not say JSON is UTF-8.
> 
> Yes, but the JSON media type registration/RFC, which Doug Crockford 
> has been working on, does say it.
> 

Also, from the above referenced draft:

"""
3. Encoding

   JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.

   Since the first two characters of a JSON text will always be ASCII
   characters [RFC-0020], it is possible to determine if an octet stream
   is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking at the
   pattern of nulls in the first four octets.

           00 00 00 xx  UTF-32BE
           00 xx 00 xx  UTF-16BE
           xx 00 00 00  UTF-32LE
           xx 00 xx 00  UTF-16LE
           xx xx xx xx  UTF-8
"""



Lee

Received on Thursday, 30 March 2006 21:06:52 UTC