I'm working with a Delphi XE DataSnap REST server and trying to return a JSON serialized object. The result that my method is returning to the client looks like this:
{"type":"ServerMethodsUnit1.TJSONIssue",
"id":1,
"fields":{
"FIssueNo":90210,
"FTitle":"Beverly Hills...that''s where I want to be",
"FKind":"Wishlist"
}
}
Well formed JSON.
The problem is that when the message is received by the client, there's a bunch of stuff added to it and it looks like this:
{"result": ["{\"type\":\"ServerMethodsUnit1.TJSONIssue\",
\"id\":1,
\"fields\":{
\"FIssueNo\":90210,
\"FTitle\":\"Beverly Hills...that's where I want to be\",
\"FKind\":\"Wishlist\"}
}
"
]
}
I'm getting a bunch of backslash characters and that "result"
tag in front.
I was wondering if anybody knows why I'm getting this extra stuff and how to get rid of it.