On Mon, Jan 22, 2018 at 6:00 PM, Alexander Beedie <
alexander.m.bee...@gmail.com> wrote:

> Test-case / repro:
> “SELECT JSON_ARRAY(1e9999,-1e9999,NULL)”
>
> Actual output:
> ‘[Inf,-Inf,null]’
>
> Expected output:
> ‘[Infinity,-Infinity,null]’
>
> All JSON parsers I have tried fail on “Inf”, but the majority will succeed
> with “Infinity” (as this is the standard JS property name)
>
JSON5 or JSON6 handle it.
http://json5.org/  https://github.com/d3x0r/json6  (
https://github.com/d3x0r/SACK/blob/master/src/netlib/html5.websocket/json/json6_parser.c
)

(also NaN)
but yes that is a deficiency in JSON.


> eg: in standard python -
>
> >> import json
> >> json.loads( ‘[Inf,-Inf,null]’ )
> ValueError: No JSON object could be decoded
> >> json.loads( ‘[Infinity,-Infinity,null]’ )
> [inf, -inf, None]
>
>
> Regards,
>
> -Alex
> --
> iPhoneから送信
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to