object FDBatchMoveDataSetReader1: TFDBatchMoveDataSetReader
DataSet = EmployeeTable
object FDBatchMoveJSONWriter1: TFDBatchMoveJSONWriter
DataDef.Fields = <>
object FDBatchMove1: TFDBatchMove
Reader = FDBatchMoveDataSetReader1
Writer = FDBatchMoveJSONWriter1
Mappings = <>
LogFileName = 'C:\Desktop\Data.log'
#include <memory> //for STL auto_ptr class
void TEmployeeResource1::Get(TEndpointContext* AContext, TEndpointRequest* ARequest, TEndpointResponse* AResponse)
FDBatchMoveJSONWriter1->JsonWriter = AResponse->building->JSONWriter;
The above code is using the JSONWriter property. With this code the data is written directly to the HTML response, reducing the work and the memory consumption!
Start your C++ Builder RAD Server:
And call your REST Endpoint for the GET: http://localhost:8080/employee.
You will get this JSON Array returned for the InterBase Employee table data:
[DownloadButton Product='RAD' Caption='Click here to get started with a Free Trial of RAD Studio ']
Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy.
Start Free Trial
Free Delphi Community Edition
Free C++Builder Community Edition