on-internet
← Community

Force JSON.stringify() to emit NaN / Infinity or JS JSON lib that does so

Stack Overflow ·

I'm looking into the feasibility of adding NaN/Infinity support to a pre-existing scientific application that uses JSONRPC for client/server interactions. Many JSON libs do handle (optionally in some cases) NaNs and Infs, for example: Python json reads and writes Java Jackson reads but writes strings instead of barewords Java GSON reads and writes Javascript can read I'm aware that NaN and Infinity are not supported in the JSON spec, and am aware of the related questions. However, AFAICT the question of whether there's some way of coercing the native JS JSON.stringify() method to emit NaN/Infi

Comments

Sign in or sign up to comment and upvote.

No comments yet.