JSON or XML Serialization
The most‑common way to provide an object for a PUT or POST request is to include it in the body of the HTTP request, usually serialized into JSON or sometimes into XML format. You can use the
myRequest.dataFormat := JadeRestRequest.DataFormat_JSON; myRequest.addObjectParam(theCustomer, Customer);
Alternatively, to serialize it into XML format, simply change the data format, as shown in the following code fragment.
myRequest.dataFormat := JadeRestRequest.DataFormat_XML; myRequest.addObjectParam(theCustomer, Customer);