Passing complex object type as null from JSON

I have converted existing RODL based server to code first server and added HTTPApi support to it.
I have written a service method as follows :

function GetRolePlayer_HTTP(const CallInfo: stCallInfo): boolean;

stCallInfo is a class inherited from TROComplexType . I have some business requirements where CallInfo can be nil.

Calling /api/rolePlayers with below JSON in body provides the expected result :
“CallInfo”: {
“ClientDateTime”: “2014-01-01T23:28:56.782Z”,
“SessionID”: 388803,
“ShortDateFormat”: “dd/MM/yyyy”,
“ShortTimeFormat”: “hh:mm”,
“UserID”: 110

but when I set “CallInfo” to empty JSON object , this is not working
Postman shows ‘Invalid Path’.

Please correct me if I am missing anything.


it works for me as expected:

>curl -verbose -X POST "http://localhost:8099/api/rolePlayers" -H  "accept: application/json" -H  "content-type: application/json" -d "{}"
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying
* Connected to localhost ( port 8099 (#0)
> POST /api/rolePlayers HTTP/1.1
> Host: localhost:8099
> User-Agent: curl/7.56.0
> Referer: rbose
> accept: application/json
> content-type: application/json
> Content-Length: 2
* upload completely sent off: 2 out of 2 bytes
< HTTP/1.1 201 OK
< Content-Type: application/json; charset=utf-8
< Accept-Encoding: gzip, identity
< Connection: keep-alive
< Content-Length: 5
* Connection #0 to host localhost left intact