Subject: Re: [Tzdist] [tzdist] #11 (service): how to represent the JSON "schema"

From: "tzdist issue tracker" <[email-masked]>
Date: Mon, 16 Feb 2015 17:33:17 -0000

#11: how to represent the JSON "schema"

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => fixed

Old description:

> Right now our draft makes use of draft-newton-json-content-rules which I
> found to be a fairly lightweight, relatively easy to understand way, to
> do that. However, that document is not actively being pursued. There has
> been some discussion in the JSON WG about working on a formal "schema"
> definition language for JSON, but that work did not make it into the
> current charter for the WG.
>
> I worry that waiting for a "formal" JSON schema to be defined would block
> us for quite some time. We could choose to do what jCal (RFC7265) and
> jCard (RFC7095) did and express the schema via ABNF, but I do think that
> is rather "ugly".

New description:

 Right now our draft makes use of draft-newton-json-content-rules which I
 found to be a fairly lightweight, relatively easy to understand way, to do
 that. However, that document is not actively being pursued. There has been
 some discussion in the JSON WG about working on a formal "schema"
 definition language for JSON, but that work did not make it into the
 current charter for the WG.

 I worry that waiting for a "formal" JSON schema to be defined would block
 us for quite some time. We could choose to do what jCal (RFC7265) and
 jCard (RFC7095) did and express the schema via ABNF, but I do think that
 is rather "ugly".

--

Comment:

 JSON notations have been included in the document section 6

 6. JSON Definitions

    [RFC7159] defines the structure of JSON objects using a set of
    primitive elements.  Those elements will be used to describe the
    structure of JSON objects used by this specification using a set of
    "rules".  The rules used are:

    OBJECT  represents a JSON object, defined in Section 4 of [RFC7159].
       "OBJECT" is followed by a parenthesized list of "MEMBER" rule
       names.  If a member rule name is preceded by a "?" (0x3F)
       character, that member is optional, otherwise all members are
       required.  If two or more member rule names are present, each

 Douglass & Daboo          Expires July 21, 2015                [Page 33]

 Internet-Draft               TZDIST Service                 January 2015

       separated from the other by a "|" (0x7C) character, then only one
       of those members MUST be present in JSON object.  JSON object
       members are unordered, and thus the order used in the rules is not
       significant.

    MEMBER  represents a member of a JSON object, defined in Section 4 of
       [RFC7159].  "MEMBER" is followed by a rule name, then the name of
       the member, followed by a ":", and then the value.  A value can be
       one of "OBJECT", "ARRAY", "NUMBER", "STRING", or "BOOLEAN" rules.

    ARRAY  represents a JSON array, defined in Section 5 of [RFC7159].
       "ARRAY" is followed by a value (one of "OBJECT", "ARRAY",
       "NUMBER", "STRING", or "BOOLEAN"), indicating the type of items
       used in the array.

    NUMBER  represents a JSON number, defined in Section 6 of [RFC7159].

    STRING  represents a JSON string, defined in Section 7 of [RFC7159].

    BOOLEAN  represents either of the JSON values "true" or "false",
       defined in Section 3 of [RFC7159].

    ;  a line starting with a ";" (0x3B) character is a comment.

    Note, clients MUST ignore any unexpected JSON members in responses
    from the server.

-- 
--------------------------------+-------------------------------
 Reporter:  [email-masked]    |       Owner:  [email-masked]
     Type:  defect              |      Status:  closed
 Priority:  major               |   Milestone:
Component:  service             |     Version:
 Severity:  Active WG Document  |  Resolution:  fixed
 Keywords:                      |
--------------------------------+-------------------------------

Ticket URL: <http://trac.tools.ietf.org/wg/tzdist/trac/ticket/11#comment:5>
tzdist <http://tools.ietf.org/tzdist/>