-1

I have heard about json and xml (SOAP) services , in fact there are SOAP and restful services and we can get reply in json format and xml format. now let me tell you what My real question is but after a little background of the story.

I am using a web service which return me the following respone

 <string xmlns="http://tempuri.org/">
[{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_6@2x.png","ImageID":"6"},{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_7@2x.png","ImageID":"7"},{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_8@2x.png","ImageID":"8"},{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_9@2x.png","ImageID":"9"},{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_10@2x.png","ImageID":"10"},{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_11@2x.png","ImageID":"11"},{"OSID":"2","PhoneVersion":"IPHONE5","PhoneOS":"IOS","ImageName":"t_12@2x.png","ImageID":"12"}]
</string>

Now I do not know what is this format and I really do not know which services is this though it is made by my friend.

So I have couple of question along with the post Title question

  1. What type of response is this ?
  2. How many type of response are there for mobile development and which is fast and efficient specially when we are getting also image in return.
  3. Do restful services can also send response in xml or other format or json response ensure that services is restful.

Now My final Question and may be most importantly

  1. How to parse this type of response and to save it in local class variable like Static string Image name etc etc

Please answer me and remove my confusion about restful services and soup services and answer the question I asked above. Thanks

Coas Mckey
  • 701
  • 1
  • 13
  • 39

1 Answers1

1
  1. JSON data with an XML wrapper
  2. Infinite! You can always make your own type. JSON is very popular
  3. REST doesn't prescribe a specific message format. XML or JSON is fine as the message format.

And

  1. Use one of the many parsers available to you (they are quite good)
Ken Wolf
  • 23,133
  • 6
  • 63
  • 84