Re: [Json] Last Call: <draft-ietf-json-rfc4627bis-07.txt> (The JSON Data Interchange Format) to Proposed Standard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

below are my editorial comments:

Abstract

   JavaScript Object Notation (JSON) is a lightweight, text-based,
   language-independent data interchange format.  It was derived from
   the ECMAScript Programming Language Standard.  JSON defines a small
   set of formatting rules for the portable representation of structured
   data.

   This document makes no changes to the definition of JSON; it repairs
   specification errors and offers experience-based interoperability
   guidance.

I believe historical considerations do not belong into the abstract (but into the Introduction)

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on May 10, 2014.

Are we sure that we do not need the "pre-5378 escape clause" here? (Section 4 of <http://trustee.ietf.org/docs/IETF-Copyright-FAQ.pdf>)

   The grammatical rules in this document are to be interpreted as
   described in [RFC5234].

Maybe note which productions are imported as well (HEXDIG and DIGIT it seems).

   This revision does not change any of the rules of the specification;
   all texts which were legal JSON remain so, and none which were not
   JSON become JSON.  The revision's goal is to fix the errata and
   highlight practices which can lead to interoperability problems.

s/fix errata/apply errata/ ?

   Insignificant whitespace is allowed before or after any of the six
   structural characters.

   ws = *(
           %x20 /              ; Space
           %x09 /              ; Horizontal tab
           %x0A /              ; Line feed or New line
           %x0D )              ; Carriage return

We *could* use SP, HTAB, LF, and CR here.

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

That's a bit misleading. How do I "encode in Unicode"? I think what it tries to say is that one of the Unicode-compatible character encoding schemes needs to be used.

   Since the first two characters of a JSON text will always be ASCII
   characters [RFC0020], it is possible to determine whether 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

I'm ok to sticking with this, but I'm also with AvK that it would be good to recommend (not necessarily RECOMMEND) UTF-8.

   An implementation may set limits on the size of texts that it
   accepts.  An implementation may set limits on the maximum depth of
   nesting.  An implementation may set limits on the range and precision
   of numbers.  An implementation may set limits on the length and
   character contents of strings.

Maybe this should be a bullet list?

10.  Generators

   A JSON generator produces JSON text.  The resulting text MUST
   strictly conform to the JSON grammar.

"strictly"?

   Encoding considerations:  8bit if UTF-8; binary if UTF-16 or UTF-32.
      JSON may be represented using UTF-8, UTF-16, or UTF-32.  When JSON
      is written in UTF-8, JSON is 8bit compatible.  When JSON is
      written in UTF-16 or UTF-32, the binary content-transfer-encoding
      must be used.

As mentioned before, please clarify that there is no such thing as content-transfer-encoding in binary transports such as HTTP.


   Person & email address to contact for further information:  IESG
      <iesg@xxxxxxxx

Missing ">"?

   Change controller:  IESG
      <iesg@xxxxxxxx

Ditto.

   o  Changed Working Group attribution to JSON Working Group.

...this is a change that will not be visible in the RFC.


Furthermore, it would be great if the spec made it crystal-clear that application/json really really has no charset parameter; maybe as a NOTE?

Finally, I did check the ABNF using Bill's ABNF Parser, and the result is good except for DIGIT and HEXDIG being defined elsewhere:

array = begin-array [ value *( value-separator value ) ] end-array
begin-array = ws "[" ws
begin-object = ws "{" ws
end-array = ws "]" ws
end-object = ws "}" ws
name-separator = ws ":" ws
value-separator = ws "," ws
ws = *( " " / %x09 / %x0A / %x0D )
value = false / null / true / object / array / number / string
false = %x66.61.6C.73.65
null = %x6E.75.6C.6C
true = %x74.72.75.65
object = begin-object [ member *( value-separator member ) ] end-object
member = string name-separator value
number = [ minus ] int [ frac ] [ exp ]
decimal-point = "."
digit1-9 = %x31-39
e = %x65 / %x45
; DIGIT UNDEFINED
exp = e [ minus / plus ] 1*DIGIT
frac = decimal-point 1*DIGIT
int = zero / ( digit1-9 *DIGIT )
minus = "-"
plus = "+"
zero = "0"
string = quotation-mark *char quotation-mark
; HEXDIG UNDEFINED
char = unescaped / ( escape ( %x22 / "\" / "/" / %x62 / %x66 / %x6E / %x72 / %x74 / ( %x75 4HEXDIG ) ) )
escape = "\"
quotation-mark = %x22
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF



Best regards, Julian






[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]