viniciussanchez / dataset-serialize

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

Whay does the JSON string start with [ and end with ] #111

Closed JacoFourie closed 3 years ago

JacoFourie commented 3 years ago

Hi.

Why does the JSON object start with [ and end with ] ?

It breaks the JSON parsers.

I I convert a result set from POSTGRESQL I will get a string like this.

[{"week_total" : 1.6719999999999999E+001}]

viniciussanchez commented 3 years ago

It depends on how you are exporting... .ToJSONObject() will create a {} .TOJSONArray() will create a []

JacoFourie commented 3 years ago

OK thank you. That solved this problem.