Change %g to %f to scanf doubles when building JSON doc.
The Python json module does not like scientific notation when loading a string using the json.loads() method.