viniciussanchez / dataset-serialize

JSON to DataSet and DataSet to JSON converter for Delphi and Lazarus (FPC)
MIT License
653 stars 161 forks source link

Bug ToJSONArray #147

Closed pacopalao closed 2 years ago

pacopalao commented 2 years ago

Hello, if you have a dataset with only one field (idalbc) an for example 3 records the result for ToJSONArray is:

[ "23920", "23921", "23922" ] is wrong

while if you have two fields (idalbc,fecha) the result is correct [ { "idalbc": "23920", "fecha": "2022-04-07 18:26:04.000" }, { "idalbc": "23921", "fecha": "2022-04-07 18:34:29.000" }, { "idalbc": "23922", "fecha": "2022-04-11 17:05:04.000" } ]

viniciussanchez commented 2 years ago

It's not wrong! Normally, when you have 1 field, it is desirable to export as you saw. But, if you want to change, just change the parameter to "False"

image