Encoding NaN in JSON

Miki Tebeka miki.tebeka at gmail.com
Wed Apr 17 10:33:26 EDT 2013


>> I'm trying to find a way to have json emit float('NaN') as 'N/A'.
> No.  There is no way to represent NaN in JSON.  It's simply not part of the
> specification.
I know that. I'm trying to emit the *string* 'N/A' for every NaN.



More information about the Python-list mailing list