delphimvcframework
delphimvcframework copied to clipboard
How to handle Master-Detail JSON response
Using the .AppendFromJSONArrayString TDataSet helper method causes error when the JSON string contains a JSONArray within a JSONArray. Similar to this array of Departments that contains Employees: [ { "Id":"{2F0940FF-8AD5-D884-B6EF-15D0B5F8F8BF}", "CompanyId":"{E3F049AC-8794-BE52-8E1C-909D5B06259F}", "DeptName":"Accounting", "Employees":[ {},{},{} **List of Employees here ] }, { "Id":"{809B5467-DC32-4B23-873A-FAE02517400B}", "CompanyId":"{E3F049AC-8794-BE52-8E1C-909D5B06259F}", "DeptName":"Engineering", "Employees":[ {},{},{} **List of Employees here ]} ]
It could be that TFDMemTable doesn't support the created dataset. If so, what would be a way to handle that scenario.
Thanks,
Kelly.
Can you produce a selfcontained example project?