Re: [Json] Leading and trailing whitespace

Jacob Davies <jacob@well.com> Tue, 11 June 2013 17:56 UTC

Return-Path: <cromis@gmail.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 DA5C221F97E6 for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 10:56:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, NO_RELAYS=-0.001]
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 rKYjGrICwS6J for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 10:56:58 -0700 (PDT)
Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) by ietfa.amsl.com (Postfix) with ESMTP id 2264921F98AC for <json@ietf.org>; Tue, 11 Jun 2013 10:56:49 -0700 (PDT)
Received: by mail-qc0-f181.google.com with SMTP id u12so766779qcx.40 for <json@ietf.org>; Tue, 11 Jun 2013 10:56:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=8lPUe3CdqQ7KmVlvFHzOqhg3u+K/QCtnyqFlJt0200M=; b=QdanWVCb8FcRySTQ/84ctFZu861WLW3t/DeaUZ1gLd3hXX3h2v/PyIXRWBHf38cAXk JLrMAnjF5avjEMiCfP8QY+8ztANLuWhy+adlStzqbz25VtDeHhzNHqIgh0I6InZ95NKs b5UoOKZUR3FbBdp04+lvKjETqXA6ejSVxdC0BS21mZDgteqHy3rk093xm9FFgiG1wyDp hqnIimuupfKYReqWAaiIZI+c0usz7Q//ohbjiJQlbnBb0vMLJtau5NFehp2IeLDxFcsV z+3d10XLZxv3VrogwvNGlSciLfFtKuuHFKr0CYqbm0hYckmEnQGeFCh5Jv3HJ3S0nOpk nOhA==
X-Received: by 10.224.199.3 with SMTP id eq3mr20141335qab.18.1370973407210; Tue, 11 Jun 2013 10:56:47 -0700 (PDT)
MIME-Version: 1.0
Sender: cromis@gmail.com
Received: by 10.49.106.228 with HTTP; Tue, 11 Jun 2013 10:56:27 -0700 (PDT)
In-Reply-To: <CAGrxA25o6shGp4tko8PT5hf3gOJfjpqKVHiSxDx-vaO1_wiAoQ@mail.gmail.com>
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> <6E03D281-D6BA-424D-A30A-3DA18E61A051@vpnc.org> <CAK3OfOiBmzCdQtyUFoBkSFMFJijE7K8eR+9YUv7bhD2YaQBW2Q@mail.gmail.com> <CAGrxA25o6shGp4tko8PT5hf3gOJfjpqKVHiSxDx-vaO1_wiAoQ@mail.gmail.com>
From: Jacob Davies <jacob@well.com>
Date: Tue, 11 Jun 2013 10:56:27 -0700
X-Google-Sender-Auth: iJI0qjhRId_8zv8NJWJNygJUP5E
Message-ID: <CAO1wJ5SDTcy5uPX28NTzek-ZmayCgiWUZMSdnSfT_TjRfcp3yg@mail.gmail.com>
To: Tatu Saloranta <tsaloranta@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Nico Williams <nico@cryptonector.com>, Jim Schaad <ietf@augustcellars.com>, 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 17:57:01 -0000

On Tue, Jun 11, 2013 at 10:29 AM, Tatu Saloranta <tsaloranta@gmail.com> wrote:
> And unlike with XML limitation for no whitespace before XML declaration,
> there does not seem to be solid reasons, other than perhaps suggestion that
> since this was omitted from definition it should not be added.

It's clearly allowed in the RFC:

JSON-text = object / array

object = begin-object [ member *( value-separator member ) ] end-object

begin-object    = ws %x7B ws

end-object      = ws %x7D ws

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

begin-array     = ws %x5B ws

end-array       = ws %x5D ws

ws = *( %x20 / %x09 / %x0A / %x0D )