Message368948
Thank you for the timely reply, Eric.
How about we add an optional argument (like the argument "ignore_nan" defaults to False as the package simplejson does) to functions like json.dumps(). So that user can choose whether he needs NaN encoded as NaN or null, meanwhile the default behavior stays the same.
In chromium based browsers, the function JSON.parse cannot parse it correctly. Here is an example below:
> JSON.parse('{"a": null, "b": NaN}')
uncaught SyntaxError: Unexpected token N in JSON at position 17
at JSON.parse (<anonymous>)
at <anonymous>:1:6 |
|
Date |
User |
Action |
Args |
2020-05-15 14:28:44 | Haoyu SUN | set | recipients:
+ Haoyu SUN, eric.smith |
2020-05-15 14:28:44 | Haoyu SUN | set | messageid: <1589552924.28.0.456445821354.issue40633@roundup.psfhosted.org> |
2020-05-15 14:28:44 | Haoyu SUN | link | issue40633 messages |
2020-05-15 14:28:44 | Haoyu SUN | create | |
|