Subject: [Json] Revised I-JSON

From: Tim Bray <[email-masked]>
Date: Fri, 25 Oct 2013 15:20:01 -0700

I revised the I-JSON draft, too late for the Vancouver cutoff.

I tried to make it line up as exactly as possible with the 4627bis draft,
and say little more than “all of those interop problems called out in 4627
draft, you MUST NOT do those things.”

HTML at https://www.tbray.org/tmp/draft-bray-i-json-01.html

---

From: "Manger, James H" <[email-masked]>
Date: Thu, 31 Oct 2013 15:32:15 +1100

> I tried to make it line up as exactly as possible with the 4627bis
> draft, and say little more than “all of those interop problems called
> out in 4627 draft, you MUST NOT do those things.”
> 

Comments on I-JSON:

Section 2.1. Self-identification

  "MUST be the first member of the object"

The spec cannot say a "urn:ietf:i-json" member must be first. This breaks the whole idea that order of members doesn't matter. It makes it awkward to generate I-JSON because many native programming-language structures for objects (such as maps) don't guarantee the order for enumerating members.

Defining a "urn:ietf:i-json" member whose value is an object, but not defining any members for that object feels a bit strange.

  "Software which is processing an I-JSON message and encounters
   an I-JSON profile containing members it does not understand
   MUST ignore those contents"

I assume "MUST ignore those contents" means "MUST ignore those members". I assume it is saying the "urn:ietf:i-json" value has a must-ignore policy; not that the top-level I-JSON object has to have a must-ignore policy.

An I-JSON message MAY include "urn:ietf:i-json" and its media type MAY include profile=i-json. Are these independent? Or are you supposed have a "urn:ietf:i-json" member when including the profile parameter?

Section 2.2. Encoding and Characters

  "SHOULD NOT include code points which identify
   Control characters (Unicode section 2.4)"

I hope newline U+000A is acceptable in I-JSON, at least as "\n". Newline is a control character so it clashes with this spec sentence. Similarly with tab; presumably carriage return; probably formfeed.

--
James Manger