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

From
Joseph Boyle <>
Date
2013-09-22T22:19:19+00:00
ID
Thread
Re: [xdi] Fwd: [Json] Small ABNF change to do some semantic separation
Here is the IETF working group charter:
https://datatracker.ietf.org/wg/json/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 <> 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 <> 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 <>

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

Date: September 22, 2013 8:16:27 AM PDT

To: "" <>

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:

OLD
member = string name-separator value
NEW
member = member-name name-separator member-value
member-name = string
member-value = value

END

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

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.

Barry

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

_______________________________________________
json mailing list

https://www.ietf.org/mailman/listinfo/json