danieleteti / delphimvcframework

DMVCFramework (for short) is a popular and powerful framework for WEB API in Delphi. Supports RESTful and JSON-RPC WEB APIs development.
Apache License 2.0
1.26k stars 360 forks source link

POST json array to TFDMemTable #517

Closed RDP1974 closed 2 years ago

RDP1974 commented 3 years ago

hello,

I want to use DMVC serializers into a webbroker app

look, do you have a function in the library that does

JSON array string -> TFDMemTable magically? (dataset creation with named fields) eventually nested data can be managed?

thanks

danieleteti commented 3 years ago

Yes, you need to create dataset with metadata and then you can load Json data. It is the only part of the Json serializer a hich Is delphi-specific. It has been created for a big customer with more than 1500 to handle where c.a. 80% were just CRUD oriented

RDP1974 commented 3 years ago

a function that creates the dataset with fields automatically from the JSON array string? please can you point me the functions and the units where found those utils?

RDP1974 commented 3 years ago

in other words, how you treat the JSON data input from the browser request? using json library iteration, etc.? but deserializing it into a TFDmemtable, then work the dataset and then re-serialize into a json output, probably it's a good way