The hash was an argument for having the means to preserve the precision (or representation) of the float (in its textual form) over decode-encode. The example was just chosen because I had experienced it in my project. But I never said that I need the underlying binary representation to be bit to bit accurate over any JSON decoder-encoder. I am perfectly aware of float binary representation limitation and already provided anecdotal evidence of different results from two different encoders. The points was that I could have this bit to bit accuracy implemented with the custom type and its encoder/decoder (if the default one did not support), if only standard module supported it. The custom type could be decimal.Decimal and the support would involve the decoding (which is already implemented) and encoding which, at the moment, is not possible to implement. So to sum up, I am asking for the support in the JSON module, so I can implement bit to bit (or let's say byte to byte) accuracy with a custom type, if needed. Not that the JSON module has to have it. I do not know if the generic solution (for an arbitrary type) is really needed and I hoped you might be able to judge that better. In my particular case it only concerns float. I can use simplejson and it solves my problem. It just seemed strange that the standard module did not support it, in particular that it supported it only half-way. I was coming here to get an idea, why it might be the case (if there was any case in the first place) and to gather other opinions.