OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [xdi] Fwd: [Json] Small ABNF change to do some semantic separation

The original message in this thread criticizes ABNF in a proposed standard using JSON, not a standard for JSON itself:

REPUTE Working Group                                       N. Borenstein
Internet-Draft                                                  Mimecast
Intended status: Standards Track                            M. Kucherawy
Expires: March 19, 2014                               September 15, 2013

                A Media Type for Reputation Interchange


   This document defines the format of reputation response data
   ("reputons"), the media-type for packaging it, and definition of a
   registry for the names of reputation applications and response sets.

Of course you may find this proposed standard to be of separate interest!

As it turns out, 4627bis itself says:

   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.

The following Changes list is mostly errata, attributions, and clarifications, which however so far do not seem to have changed any of the ABNF.

One other thing to note is that 4627 defines both JSON text and JSON value, in that order. We use value, not text.

   A JSON text is a serialized object or array.

   JSON-text = object / array

   A JSON value MUST be an object, array, number, or string, or one of
   the following three literal names:

   false null true

   The literal names MUST be lowercase.  No other literal names are

      value = false / null / true / object / array / number / string

On Sep 22, 2013, at 3:31 PM, Drummond Reed <drummond.reed@xdi.org> wrote:

Joseph, good detective work!

Have you looked at RFC 4627bis? Does it have the ABNF improvements that the message you cited earlier recommended?

On Sun, Sep 22, 2013 at 3:27 PM, Joseph Boyle <planetwork@josephboyle.net> wrote:
Draft: https://datatracker.ietf.org/doc/draft-ietf-json-rfc4627bis/

JSON Working Group                                          T. Bray, Ed.
Internet-Draft                                              Google, Inc.
Intended status: Standards Track                      September 18, 2013
Expires: March 22, 2014

                    The JSON Data Interchange Format

On Sep 22, 2013, at 3:19 PM, Joseph Boyle <planetwork@josephboyle.net> wrote:

Here is the IETF working group charter:
They expect only minor changes to RFC 4627 which we will of course cite.

The only milestone listed at the bottom is:
Jan 2014    Request publication of JSON specification

On Sep 22, 2013, at 1:01 PM, Drummond Reed <drummond.reed@xdi.org> wrote:

Joseph, I agree with you. Question: do we know for sure that there is a "coming JSON spec for the JSON definition in BNF"? If so, when do we expect it?

On Sun, Sep 22, 2013 at 9:59 AM, Joseph Boyle <planetwork@josephboyle.net> wrote:
I agree with this argument. Our spec should refer to the coming JSON spec for the JSON definition in BNF, rather than forking our own copy of the JSON ABNF that could become obsolete.

Begin forwarded message:

From: Barry Leiba <barryleiba@computer.org>
Subject: [Json] Small ABNF change to do some semantic separation
Date: September 22, 2013 8:16:27 AM PDT

The repute working group has defined a response object in JSON.[1]  At
first they did it using ABNF.  That means that it (badly) duplicated
the ABNF that's already in 4627, trying to say where "ws" can go,
defining what has to have DQUOTE around it (for which the repute doc
used "%x22"), worrying about when to use value-separator and when to
use name-separator (and sometimes using "," instead, in some
versions), using "{" instead of citing begin-object, and so on.  It
was messy, error-prone, and subject to deviations from JSON ABNF if
that should change.

In the -13 version of the repute document, at my instigation, Murray
changed it to use a definition based on primitives from JSON -- not
ABNF primitives, but JSON primitives, objects and members and arrays,
names and values, strings and ints.  See
draft-ietf-repute-media-type-13, Section 6.2.

I intend, eventually, to write a document suggesting a consistent way
to do this, so others who come to the same place to the same thing in
the same(-ish) way.  The only hassle was that there are some semantic
gaps in the ABNF, which don't affect the grammar per se, but which do
affect how we can refer to the grammar for the semantic elements.  In
particular, "member" is defined as a "string" and a "value", not as a
member name and member value.  And "array" is defined as a set of
"value", losing the semantic distinction between a member value and an
array value.  There's no way to refer to the semantic element that is
the member name, for instance -- the fact that it's syntactically
represented by a "string" is fine, but there's a step missing.

I strongly suggest making a small editorial change to the JSON ABNF,
to separate these semantic entities from their type definitions:

member = string name-separator value
member = member-name name-separator member-value
member-name = string
member-value = value

array = begin-array [ value *( value-separator value ) ] end-array
array = begin-array [ array-value *( value-separator array-value ) ] end-array
array-value = value

This doesn't change how JSON is represented in the ABNF, but it allows
us to better use the ABNF to refer to the semantic elements.


[1] See https://datatracker.ietf.org/doc/draft-ietf-repute-media-type/
json mailing list

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]