> Le 9 avr. 2017 à 03:08, Jens Alfke <[email protected]> a écrit :
> 
>> On Apr 7, 2017, at 5:26 PM, Rolf Ade <[email protected]> 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 (http://www.rfc-editor.org/rfc/rfc7159.txt 
>> <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 “Be strict in what 
> you write, but lenient in what you read.” I don’t see a point in disallowing 
> something as trivial as redundant leading zeroes.

If you'd go with Postal's Law, you would make it so:

sqlite> select json(' { "this" : 000.23 } ');   // be lenient in what you read
{"this":0.23}                                   // be strict in what you write

:)

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software


_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to