Subject: Re: [Json] ABNF nits

From: Carsten Bormann <[email-masked]>
Date: Mon, 10 Jun 2013 23:15:07 +0200

Joe was kind enough to check in an extracted and completed version of the ABNF at:

> http://svn.tools.ietf.org/svn/wg/json/abnf/json.abnf

I just generated 10000 random instances of that grammar using Jutta Degener's brilliant abnfgen tool and checked them against the Ruby JSON parser.
10 of the random instances didn't pass because the random generator managed to generate escapes for unpaired surrogates...
(It is unlikely that we want to address any of this at the ABNF level, so that is not a bug.)

So we have passed a first test indicating that the grammar doesn't seem to generate a superset of the language.
If you want to repeat this test against your favorite JSON parser, I can send you the 10000 random instances or you can run abnfgen yourself (after changing the %x10FFFF to %x7E, as abnfgen is not Unicode-savvy).

Now I would like to run a test whether the things we consider JSON documents are all parsed by the grammar.

If anyone has a corpus of JSON texts, or a way to generate random JSON texts, I would like to check them against the ABNF.  Please contact me off-list.

Grüße, Carsten