Intelwalk
Intelwalk

Reputation: 671

iOS Web Service

I will be writing an iOS program and I have a similar one in Android that hits a web service for some data that returns a json array that I parse. Would this be a viable option in iOS or does it have a better way to get/parse data requests from web services?

Thanks

Upvotes: 0

Views: 413

Answers (3)

AdamM
AdamM

Reputation: 4440

That would work fine. Many apps out there do this, and JSON is usually the preferred method for mobile devices, smaller payload. And if you want a good JSON parser, use

http://stig.github.com/json-framework/

Upvotes: 1

TeaCupApp
TeaCupApp

Reputation: 11452

iOS has native JSON parser, So it will be more eaiser.

NOTICE: I am assuming you want to support iOS 5.0 and not iOS 4.0

Upvotes: 1

Thomas Clayson
Thomas Clayson

Reputation: 29935

You can use json in iOS, so its probably easier for you to just do that. Have a look at this framework: https://github.com/stig/json-framework/ its very good for parsing and using json within ios apps.

The other thing you can do is change the output of your webservice into plist format for iOS. Plist format is used natively on iOS and so there is native support. Its pretty easy to convert a plist into an NSArray or an NSDictionary.

Upvotes: 1

Related Questions