Miki Tebeka <miki.teb...@gmail.com> wrote: > >I'm trying to find a way to have json emit float('NaN') as 'N/A'. >I can't seem to find a way since NaN is a float, which means overriding >"default" won't help. > >Any simple way to do this?
No. There is no way to represent NaN in JSON. It's simply not part of the specification. From RFC 4627 section 2.4: Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list