Thursday 17 October 2019

Will the generic TObjectList bug with serialising to JSON get fixed?

When I try to serialise a generic TObjectList to JSON doing something like this:

Response.Content  := TJSON.ObjectToJsonString(MyObjectList);

I get the error Type tkPointer is not currently supported. I am using 10.3 and I believe this bug (21685) has been around since XE8. I am currently having to think of workarounds and trying to find the best solution. It would be really useful if they would fix this bug, or give some idea of when it will be fixed, does anyone know?

Tuesday 20 August 2019

What are the Delphi alternatives to RAD Server for REST?

I am looking at the best solution for a REST service in Delphi (Berlin or Rio) and all the tutorials and examples I have come across use RAD Server, which is part of the Enterprise version and not in the Professional version, which is the version I am using. One possible alternative to RAD Server is to use 3rd party components like Habari. Does anyone have any advice on alternatives or is RAD Server the best option for RESTful services in Delphi? 

Monday 22 July 2019

ClientDataSet SaveToFile writes the field values in reverse order

I have noticed that when I have a TClientDataSet with a single record and I use 'SaveToFile' to save the values to an XML files the order of the fields in the XML is in reverse order. For example if you have the following in the TClientDataSet:

TableID
Name
Address

When this is saved to an XML file the meta data is in the correct order, but the values for the fields in the XML is in reverse order.

Address
Name
TableID

I wonder if this is done by design.

The version of Delphi I am using is Tokyo.