I am doind something wrong but i cant find out what it is.
This code :
while not qry1.EOF do begin
jsonItem := TJSONObject.Create;
jsonItem.Add('LineNo', qry1.FieldByName('line').AsInteger);
jsonItem.Add('Qty', qry1.FieldByName('qty').AsFloat);
jsonItem.Add('Price', qry1.FieldByName('price').AsFloat);
jsonItems.Add(jsonItem);
qry1.Next;
end;
jsonDoc.Add('Items', jsonItems);
Gives me scientific notations, which i do not want, my data are float numbers with max 4 decimal places and i want them to be exported to json as such.
And when i call it as a string it encloses it in double quotes, as it should because i called it as a string :
jsonItem.Add('Price', qry1.FieldByName('price').asstring);
i just want it exported as
and not as