Re: [Json] Regarding JSON text sequence ambiguities (Re: serializing sequences of JSON values)

Tatu Saloranta <tsaloranta@gmail.com> Tue, 11 March 2014 03:12 UTC

Return-Path: <tsaloranta@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 236F11A0395 for <json@ietfa.amsl.com>; Mon, 10 Mar 2014 20:12:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f5uUaeFsWagj for <json@ietfa.amsl.com>; Mon, 10 Mar 2014 20:12:26 -0700 (PDT)
Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) by ietfa.amsl.com (Postfix) with ESMTP id 3A37B1A0398 for <json@ietf.org>; Mon, 10 Mar 2014 20:12:26 -0700 (PDT)
Received: by mail-wi0-f180.google.com with SMTP id hm4so277574wib.1 for <json@ietf.org>; Mon, 10 Mar 2014 20:12:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kNSvp31ljR/IW1IA2aUzxc5veoRetZ3Qg3Tnj3b+WEE=; b=odoCz0zmOcawSsu3FNdrhnC+5kvzHgEuNtxZDP9s2l89q+hzq1FjwXgaLdEMexOx4x 52ZNsbBjRa515jPR8rE0JksQKLswhUhS4rDY7LXpOZwAbb0PjHDSdAWV8hL2738uGDTr ppKwgVUZpdVLuqd5G6bh4iVzkZyJ+53v7R6jn3cBr+oL7eTLkhnnsrurLdJNw1uLM40f E5lrEqA6W0jJVv4dgY5yazqG9EmhqKGQAtf8qcadRJkir4AvT43fcaPBlFSb51YFt3hn fBsjcRjTOfLDWofXoS/ULyPqJ4JD7S8qElTAUBDUWVAQ/rXqAUe5QTkqvYTzkkhir4T3 gdVg==
MIME-Version: 1.0
X-Received: by 10.180.126.38 with SMTP id mv6mr1054760wib.46.1394507540149; Mon, 10 Mar 2014 20:12:20 -0700 (PDT)
Received: by 10.227.245.10 with HTTP; Mon, 10 Mar 2014 20:12:20 -0700 (PDT)
In-Reply-To: <20140311030648.GS18880@mercury.ccil.org>
References: <CAK3OfOj_XQJq-JKAjNdH-GuH0_UwZfeWntgyyizMpTLmSaWQoA@mail.gmail.com> <CAK3OfOio58+1yuxQOcvWep1CADMfE1PVC48XDid0dWvd8=SVjA@mail.gmail.com> <20140310235903.GJ18880@mercury.ccil.org> <CAK3OfOgOjFMSsxdUcczMOYmk8jfSa+8r83K3ENzqiP293V2L8g@mail.gmail.com> <20140311030648.GS18880@mercury.ccil.org>
Date: Tue, 11 Mar 2014 03:12:20 +0000
Message-ID: <CAGrxA271SrPuTus6Sji2QnG_5gHoK4V5G+Qi3xWQ20f25FZEqw@mail.gmail.com>
From: Tatu Saloranta <tsaloranta@gmail.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: multipart/alternative; boundary=e89a8f839ccb913c7604f44c166e
Archived-At: http://mailarchive.ietf.org/arch/msg/json/16pjwroQEi32cUTlS-J86KOyjw0
Cc: Nico Williams <nico@cryptonector.com>, Paul Hoffman <paul.hoffman@vpnc.org>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Regarding JSON text sequence ambiguities (Re: serializing sequences of JSON values)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 11 Mar 2014 03:12:28 -0000

On Tue, Mar 11, 2014 at 3:06 AM, John Cowan <cowan@mercury.ccil.org> wrote:

> Nico Williams scripsit:
>
> > But there's
> > still an ambiguity in an online parser: is online parsing of
> > "[nulltrue]" to produce an array element value of null followed by an
> > error, or is it to produce just the one error?
>
> If it's an error, I don't care what junk it has already produced,
> so I'm quite indifferent to that.
>


Based on feature requests I received for handling this specific case (for
Jackson), I would suggest producing error as soon as practical; in this
case once "nullt" has been decoded from input.
At least this was the behavior that was considered appropriate by users;
and specifically NOT to allow intermediate production of valid token for
'null' (doing which was reported as a bug).

-+ Tatu +-