You are not logged in.
I think something is wrong when building JSON using the dvoAllowDoubleValue option for a floating-point value (exponent)
Example:
TFileEntity = packed record
double_params: TDoubleDynArray;
end;
raw: RawUTF8;
entity: TFileEntity;
header: Variant;
SetLength (entity.double_params, 4);
entity.double_params [0]: = -12.12345678;
entity.double_params [1]: = -9.9e-15;
entity.double_params [2]: = -9.88e-15;
entity.double_params [3]: = -9.e-15;
raw: = RecordSaveJSON (entity, TypeInfo (TFileEntity));
header: = _Json (raw, [dvoReturnNullForUnknownProperty, dvoAllowDoubleValue]);
"raw" return correct value:
{"double_params":[-12.12345678,-9.9E-15,-9.88E-15,-9E-15]}
but, when the conversion to JSON is done, in the position 2 of the double_params array I have the quotes:
header = '{"double_params":[-12.12345678,"-9.9E-15",-9.88E-15,-9E-15]}'
I use dvoAllowDoubleValue but it does not eliminate quotes in this situation:
"-9.9E-15" => bad
-9.9E-15 => ok
ps. Uses the last version of mORMot
Offline
Should be fixed by https://synopse.info/fossil/info/ee60f02c55
Thanks for the feedback and sorry for the inconvenience.
Offline
I confirm, it's ok now. thank you very much.
Offline