Re: FYI: JSON parsing

Julian Reschke <julian.reschke@gmx.de> Thu, 27 October 2016 09:10 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 14234129D01 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 27 Oct 2016 02:10:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.352
X-Spam-Level:
X-Spam-Status: No, score=-7.352 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.431, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 MUGP-0iUhNL3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 27 Oct 2016 02:09:57 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 03046129CF1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 27 Oct 2016 02:09:57 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bzgdD-0007Wx-5b for ietf-http-wg-dist@listhub.w3.org; Thu, 27 Oct 2016 09:05:51 +0000
Resent-Date: Thu, 27 Oct 2016 09:05:51 +0000
Resent-Message-Id: <E1bzgdD-0007Wx-5b@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <julian.reschke@gmx.de>) id 1bzgd9-0007UF-6r for ietf-http-wg@listhub.w3.org; Thu, 27 Oct 2016 09:05:47 +0000
Received: from mout.gmx.net ([212.227.15.18]) by titan.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <julian.reschke@gmx.de>) id 1bzgd1-0003x6-EK for ietf-http-wg@w3.org; Thu, 27 Oct 2016 09:05:42 +0000
Received: from [192.168.178.20] ([93.217.76.137]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lj1Xa-1ccbjd1Zni-00dCb1; Thu, 27 Oct 2016 11:05:03 +0200
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <B10FA80E-0A8E-4DBF-A400-963A582B7677@mnot.net> <66144.1477553363@critter.freebsd.dk> <e00a76b6-3b4b-6eb1-41a4-9214e93cdaf3@gmx.de> <66657.1477558851@critter.freebsd.dk>
Cc: Mark Nottingham <mnot@mnot.net>, HTTP working group mailing list <ietf-http-wg@w3.org>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <b41122ed-b25a-7ce8-a3bf-331d9f916bad@gmx.de>
Date: Thu, 27 Oct 2016 11:05:02 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <66657.1477558851@critter.freebsd.dk>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:+DEqx6AZo6J5YNwFYzr3mTaKVWeTFeVUHLmK6QYVzH0kP/70Mb7 aGNI4maRvyJdPYlzFtvskGyzM+KngYmwK2wJAy93rxxZtnlaXJQU4XvpGflSU6xDaShgmcx mXkPn31AGhlSaszlJIle3srfbPNmP3Lx6EAMNsgA2oVUJVlMveqTXLYR73mdYAGV8zm9rJq j/+edOhW86k8XAzmHaXVQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:CpYzzQHzMh8=:i5Bfd7Rw72bCIXEFQ8lEbT KuqhF57IorNtgWMVrRqbu5v10WpkU5flXXsQsibj+Qum/tPBj2i1SdLM6s+c0veiTVm+D6ZRM 1j4fRD/8phzenhRVpY3WejaF1v8pmwFrE8h26YXXRh2PSz8tbrXoxnT8D/azCAsXw13F960RC NI3NNlsA4XK8MH5KdR77mqGSTJFAIpCAgACdyvkfJEGOmrhm9QT4D8+y/32yfyCtMZLajZEdD 3mfAdU4ABuzrFscMS/vJLZ78V04GBpcJBiR8eJh/Cm4pOrcIiynxEZ8JfkjHfI/WcjxnjhxI0 6o92n2ehp81xlPDBqIzB85CbLLTv4fWo465t++v9Ri/nbi3uOsJrVtZkyNdz9+F1OO0JVHSrC ylvfYsfv73Rmwhajfm4PYrqQ8Klhw9ls8MDkMVrQvrTon31xBJFPBWcRbGool5FInGWalIrrZ wCdsyZvmfIMO2uIFJIylOTjfFhnDKNbiIXUhima8e9gHjZgsy7zYYbynO5zQzwLgV1doz64wk dzXEBXf0otJ8QbjjMP89oAin8xEDP/K4WEZDKjBHgqNZa9z7V47n1Uc6CLWRvq01BIP9TYTLP /g1uoE24g9VSSroaHfs8OiGEF+SV3/wHT4/R10EnL5T1pZCx+8oShf8GASTpl9noHFwfAUgBy QDM+XKgO9Y0IyM3vtVE+I+oELEcuaLBsexieUYj8t54x3cktSxzJ3XKQt+n3enefO8gY1YDDy RzOdu+wWxFYC8BayiuPUTVZ1SHQ64N/awrksel3dMyIJVFTqYtPJeYMgINJCxnu+ME1ZfBBhO L9PcTtH
Received-SPF: pass client-ip=212.227.15.18; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-6.7
X-W3C-Hub-Spam-Report: AWL=-0.078, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1bzgd1-0003x6-EK ba76f1e36af709706d768d511e20b1fd
X-Original-To: ietf-http-wg@w3.org
Subject: Re: FYI: JSON parsing
Archived-At: <http://www.w3.org/mid/b41122ed-b25a-7ce8-a3bf-331d9f916bad@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32690
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 2016-10-27 11:00, Poul-Henning Kamp wrote:
> --------
> In message <e00a76b6-3b4b-6eb1-41a4-9214e93cdaf3@gmx.de>de>, Julian Reschke writes
> :
>> On 2016-10-27 09:29, Poul-Henning Kamp wrote:
>>> --------
>>> In message <B10FA80E-0A8E-4DBF-A400-963A582B7677@mnot.net>et>, Mark Nottingham wri
>>> tes:
>>>
>>>> For those who haven't seen it, this is a pretty deep dive on JSON
>>>> parsing ambiguities and mis-implementations.
>>>>
>>>>  http://seriot.ch/parsing_json.html
>>>>
>>>> Food for thought...
>>>
>>> Add to that thought that we cannot even use JSON to begin with, because
>>> of the restrictions on H1 headers...
>>
>> Sorry? Could you elaborate?
>
> "real" JSON can contain newlines

Yes, but it's not relevant whether we can transport random JSON. What's 
relevant is that all JSON can be converted to something that can be 
safely transmitted in HTTP/1.1 header field values (and that is the case).

Best regards, Julian