Dataset to Json lazarus / 16-Databases ---------------------------------------------------------------------- taqtaq · 2018-09-03 22:21 Hello, Is there any class or function to convert a dataset to json? In Delphi you can use DataSetConverter4Delphi (  https://github.com/ezequieljuliano/DataSetConverter4Delphi  ) Is there something like that? I'm looking for something to convert dataset->json and json->dataset Thanks ---------------------------------------------------------------------- marcov · 2018-09-04 08:14 There is a fpjsondataset unit included with fpc/lazarus. I don't know if it is something similar, but have a look ---------------------------------------------------------------------- LuizAmérico · 2018-09-05 14:06 https://github.com/blikblum/luipack/blob/master/luicomponents/luijsonu tils.pas#L140-L149 Examples: Result := DatasetToJSON(RequestItemsDataset, [djoSetNull], '');    or DatasetToJSON(Query, TJSONArray(ResponseData), ConvertOptions, FOutputFields); Where FOutputFields is '["id", "name", {"name": "sectorid", "mapping": "wardid"}, "registry", "gender", "birthdate", "admissiondatetime", "bednumber", "cns", "isolationdata"]'; The dbfield wardid will be exported with sectorid name