Re: [Json] Leading and trailing whitespace

Vinny A <jsontest@yahoo.com> Tue, 11 June 2013 03:07 UTC

Return-Path: <jsontest@yahoo.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6A47F11E80D7 for <json@ietfa.amsl.com>; Mon, 10 Jun 2013 20:07:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.355
X-Spam-Level:
X-Spam-Status: No, score=0.355 tagged_above=-999 required=5 tests=[AWL=0.069, BAYES_05=-1.11, MIME_QP_LONG_LINE=1.396]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r2fpYZZ4UyaN for <json@ietfa.amsl.com>; Mon, 10 Jun 2013 20:07:18 -0700 (PDT)
Received: from nm2-vm1.bullet.mail.bf1.yahoo.com (nm2-vm1.bullet.mail.bf1.yahoo.com [98.139.213.158]) by ietfa.amsl.com (Postfix) with ESMTP id 30D9821F9949 for <json@ietf.org>; Mon, 10 Jun 2013 20:07:14 -0700 (PDT)
Received: from [98.139.212.145] by nm2.bullet.mail.bf1.yahoo.com with NNFMP; 11 Jun 2013 03:07:14 -0000
Received: from [98.139.213.3] by tm2.bullet.mail.bf1.yahoo.com with NNFMP; 11 Jun 2013 03:07:14 -0000
Received: from [127.0.0.1] by smtp103.mail.bf1.yahoo.com with NNFMP; 11 Jun 2013 03:07:14 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1370920034; bh=gUU79MZ15WNcH+xyMryK6GYUfAPiPHicIwDQWQ1AZvQ=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=TUw0YVdJd3TFPufKU/3xE3Sl875ks/r+q/MqpLSPVHEfD/wQzXmtKUxFELIlkDlobVOeO/TJsZs9Rc2gG9PlNumBejJ6S2iy0xGr0lLOo8LRJRDhb+pntc/rUfiz9IfnfhGrH8QQho8FBPntUujJla0RTG36Epn2qQVNJgfvqLk=
X-Yahoo-Newman-Id: 348806.8453.bm@smtp103.mail.bf1.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: LZFdz_cVM1kmQb_cssKo14vy2ZpJFX0gJ1PzUf559GlhE2q NM3jBn8ErJQE4H0yLy1qnT9hNDGaARv1567yoaAcS1_78t45EqrbI48GH.Df x32s3utsU7pFkKdTo83O2uOUnno7LwGAUBn1r8u2e8zwo04HdNlJago1eQwT SNni1.mb8D6v6flNwN5O9PaDlsMhBVfXSN_hzQZhViHTmSUMQdCLnf5yIDBI v13gl4E3hXBpp2Z_UWZOfXk1R3cmrcrCKWlffyum0hh4ElQkLIVyO7kErxYX QM9eUqu_OXe6rz.PbuJdjI.zg1rkNgPeT0FkgyhaWxrBAe_TfJHU88jQC1wp hSAMHGH369KIr3Zo5YWs8VeTXwy7aS62FiK8jkHW8CSJ_NlCvHy_WjBVm60o vfeTZS.q2l4ZCc6klYLucDlz6ix86DIvkLTRdNPytfvBG5aBA9XgIKUWTaBr jP5_kEU_TgJ5YERjBUzO9pjxwxk4zB_ZRO69t9DYmOQZmlDxnoS1d4K6wm6V ygOSC7h22tfEkLR4HJymiznEt
X-Yahoo-SMTP: indQcmSswBC8IKsm6t4aCAPskK3T
X-Rocket-Received: from [192.168.0.102] (jsontest@76.29.100.42 with ) by smtp103.mail.bf1.yahoo.com with SMTP; 10 Jun 2013 20:07:14 -0700 PDT
References: <06c101ce6625$0f891bf0$2e9b53d0$@augustcellars.com> <379266A1-82C1-4FF5-BD7C-EE657F1FD41F@vpnc.org> <06e901ce6638$e8f27a90$bad76fb0$@augustcellars.com> <51DE7E41-D682-4340-A234-7F7CFE513C10@vpnc.org> <070b01ce664b$e5e0ac10$b1a20430$@augustcellars.com>
In-Reply-To: <070b01ce664b$e5e0ac10$b1a20430$@augustcellars.com>
Mime-Version: 1.0 (1.0)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Message-Id: <C7AD882C-376D-4814-A00E-6D22F72330F2@yahoo.com>
X-Mailer: iPod Mail (9B206)
From: Vinny A <jsontest@yahoo.com>
Date: Mon, 10 Jun 2013 22:07:11 -0500
To: Jim Schaad <ietf@augustcellars.com>
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Leading and trailing whitespace
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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 Jun 2013 03:07:23 -0000

On Jun 10, 2013, at 9:32 PM, "Jim Schaad" <ietf@augustcellars.com> wrote:
> Yes -but what I am saying is that there are (probably) parsers which stop
> before the string has been fully consumed.  Thus they would accept the
> string as valid.

There may be parsers that stop parsing at the end }, but (IMO) that sounds like a lazy parser. I just tested the Golang encoding/JSON default package and it rejects your JSON as invalid.

It sounds to me that you're trying to make the larger point of "what text, if any, is valid outside of the JSON braces." Whitespace - to me - is syntactic sugar. Even leading and trailing whitespace is helpful: it provides space for future comments, for example.


-----------------
Vinny
www.jsontest.com