How to format JSON Float without E-001 notation? lazarus / 21-General ---------------------------------------------------------------------- Michael Collier · 2023-04-18 22:09 I'm using TJSONStreamer to convert a TPersistent object to TJSONObject and then calling FormatJSON on that to get the JSON representation. My Float values (currency/single/double) such as 1.1 always display like this.. {   "myfloat" : 1.1000000000000001E+000 } is there any way I can get the output to look like this?.. {   "myfloat" : 1.1 } It must look like this so that my program output looks consistent with other JSON documents saved by hand. Thanks, Mike ---------------------------------------------------------------------- Zvoni · 2023-04-19 06:57 Quote from: Michael Collier on April 19, 2023, 12:09:44 amI'm using TJSONStreamer to convert a TPersistent object to TJSONObject and then calling FormatJSON on that to get the JSON representation. My Float values (currency/single/double) such as 1.1 always display like this.. {   "myfloat" : 1.1000000000000001E+000 } is there any way I can get the output to look like this?.. {   "myfloat" : 1.1 } It must look like this so that my program output looks consistent with other JSON documents saved by hand. Thanks, Mike https://wiki.freepascal.org/fcl- json#Change_formatting_of_float_numbers