Re: [sqlite] json() number value parsing

2017-04-11 Thread Rolf Ade
Am 04/09/2017 10:34 AM, Olivier Mascia wrote: Le 9 avr. 2017 à 03:08, Jens Alfke a écrit : On Apr 7, 2017, at 5:26 PM, Rolf Ade wrote: ./sqlite3 SQLite version 3.19.0 2017-04-07 20:20:08 [...] sqlite> select json(' { "this" : 000.23 } ');

Re: [sqlite] json() number value parsing

2017-04-10 Thread Jens Alfke
> On Apr 10, 2017, at 6:37 AM, Dominique Devienne wrote: > > I ran into http://json5.org/ which is an interesting > "for-humans" extension to JSON. I love JSON5. It’s an extension of JSON that adds extra syntax from JavaScript, like single quotes,

Re: [sqlite] json() number value parsing

2017-04-10 Thread Dominique Devienne
On Mon, Apr 10, 2017 at 2:27 PM, Richard Hipp wrote: > On 4/10/17, Richard Hipp wrote: > > SQLite returns true from json_valid() for the following cases which > > should allegedly be false: > > > > n_multidigit_number_then_00.json > >

Re: [sqlite] json() number value parsing

2017-04-10 Thread Richard Hipp
On 4/10/17, Richard Hipp wrote: > SQLite returns true from json_valid() for the following cases which > should allegedly be false: > > n_multidigit_number_then_00.json > n_string_unescaped_newline.json > n_string_unescaped_tab.json > The second and third are now fixed on

Re: [sqlite] json() number value parsing

2017-04-10 Thread Richard Hipp
On 4/10/17, Dominique Pellé wrote: > > SQLite json could be added to https://github.com/nst/JSONTestSuite > (in the parsers/ directory). > Thanks for the pointer. I did not know about that project. SQLite returns true from json_valid() for the following cases which

Re: [sqlite] json() number value parsing

2017-04-10 Thread Dominique Pellé
Dominique Devienne wrote: > On Sun, Apr 9, 2017 at 10:34 AM, Olivier Mascia wrote: > >> > Le 9 avr. 2017 à 03:08, Jens Alfke a écrit : >> > >> >> On Apr 7, 2017, at 5:26 PM, Rolf Ade wrote: >> >> ./sqlite3 >> >>

Re: [sqlite] json() number value parsing

2017-04-10 Thread Dominique Devienne
On Sun, Apr 9, 2017 at 10:34 AM, Olivier Mascia wrote: > > Le 9 avr. 2017 à 03:08, Jens Alfke a écrit : > > > >> On Apr 7, 2017, at 5:26 PM, Rolf Ade wrote: > >> ./sqlite3 > >> SQLite version 3.19.0 2017-04-07 20:20:08 > >> [...] > >>

Re: [sqlite] json() number value parsing

2017-04-09 Thread Olivier Mascia
> Le 9 avr. 2017 à 03:08, Jens Alfke a écrit : > >> On Apr 7, 2017, at 5:26 PM, Rolf Ade wrote: >> ./sqlite3 >> SQLite version 3.19.0 2017-04-07 20:20:08 >> [...] >> sqlite> select json(' { "this" : 000.23 } '); >> {"this":000.23} >> If I read RFC 7159

Re: [sqlite] json() number value parsing

2017-04-08 Thread Jens Alfke
> On Apr 7, 2017, at 5:26 PM, Rolf Ade wrote: > > If I read RFC 7159 (http://www.rfc-editor.org/rfc/rfc7159.txt > ) correct > this should return: "Error: malformed JSON". In this case I would go with Postel’s Law, paraphrased as