Monday, 19 August 2013

accessing json inside request body

accessing json inside request body

I am using an API provided to us by someone else and it returns it this way:
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://ywers.com">
[{"Name":"Edward", "LastName":"Jones", "Address":"{accepted}"}
,{"Name":"Carlos", "LastName":"Ramirez", "Address":"{Rejected}"}]</string>
what is the best way to extract the JSON and also, how can I brake the
JSON into separate objects like
{"Name":"Edward", "LastName":"Jones", "Address":"{accepted}"}
and
{"Name":"Carlos", "LastName":"Ramirez", "Address":"{Rejected}"}
As you can see one of the fields returns with a bracket inside. Another
issue i am having is that i think the brackets are coming as question
signs when i print the response.

No comments:

Post a Comment