Re: [Lazarus] JSON float saving scientific value

2011-11-09 Thread silvioprog
2011/11/6 tcoq : [...] > or by implementing your new type yourself, something like > "TJSNExtFloatNumber" which overrides the GetAsString function. > The second way should work without changing the JSON base code. However > loading a JSON stream will still get you the base TJSONFloatNumber. Yeah

Re: [Lazarus] JSON float saving scientific value

2011-11-09 Thread tcoq
ichael Van Canneyt" À: "Lazarus mailing list" Envoyé: Dimanche 6 Novembre 2011 16h22:09 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Lazarus] JSON float saving scientific value ... You should definitely not do that, because then the resulting stri

Re: [Lazarus] JSON float saving scientific value

2011-11-06 Thread Michael Van Canneyt
On Sun, 6 Nov 2011, tcoq wrote: Hello, either you recode the function below: "function TJSONFloatNumber.GetAsString: TJSONStringType; begin Str(FValue,Result); end; " Either by changing to using formatted string conversion, using FloatToStrF function. You should definitely not do that, b

Re: [Lazarus] JSON float saving scientific value

2011-11-05 Thread tcoq
"Lazarus mailing list" Envoyé: Vendredi 4 Novembre 2011 00h24:50 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: [Lazarus] JSON float saving scientific value Hi, I'm trying to save a float value: 1.5. But some class is converting the value to "1.500

Re: [Lazarus] JSON float saving scientific value

2011-11-04 Thread silvioprog
2011/11/4 tcoq : > Hello silvio, > 1.5E+000 is exactly 1.5, from a numerical point of view. It seems > that you are getting what you need: storing a real. > Why would you want to have the "1.5" string? What is the issue? > Thierry For transporting data to a database from a mobile, via WAP

Re: [Lazarus] JSON float saving scientific value

2011-11-03 Thread tcoq
rus mailing list" Envoyé: Vendredi 4 Novembre 2011 00h24:50 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: [Lazarus] JSON float saving scientific value Hi, I'm trying to save a float value: 1.5. But some class is converting the value to "1.50E+000&