Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Robust DataSet To JSON And JSON To DataSet API For Delphi

robust dataset to json reverse api for delphi

Most of the time, developers tend to use DataSet to manipulate the data in their applications. DataSet is helpful because it stores data in the dataset’s fields array property. You can easily access these values by number or by name. Moreover, each field can be used to read or modify the current record’s data by using its Value property or type-specific properties such as AsString, AsInteger, and so on. FireDAC itself has a built in SaveToFile and LoadFromFile (plus SaveToStream and LoadFromStream) for dataSets which supports XML, JSON, and binary.

And now, I would like to introduce you to the DataSetConverter4Delphi API. This is an API to convert JSON objects for DataSet and also doing the reverse process, like converting DataSet into JSON. And it works with the TDataSet, and TJSONObject, TJSONArray classes.

Furthermore, it is easy to add to your project, you just need to specify the path of the modules and you are good to go. 

Convert DataSet to JSON

[crayon-67682df08d7f2387873846/]

Be sure to check out the DataSetConverter4Delphi library!

Next, learn how you can append to String Python and answer other questions about String Operations in C++ software in this article.

Exit mobile version