print out py and java json string with nan and inf

Note that Java quotes NaN and Infinity, which doesn't make much sense.
There's no way for the receiving code to know whether it's a legit NaN
or Infinity or just the string "Nan" etc.
javascript JSON experiments, more py and Java output