PradeepG
PradeepG

Reputation: 206

Parse JSON in iphone application with json-framework

I am new in iphone development.I am using currency converter in my apps. I don't have any idea how to parse json with this url http://www.google.com/calculator?. I want to send my all detail such as quantiy,select currency,to currency and wants to display the result in label. pls provide any help or any code for me how will i parse this data.

Upvotes: 0

Views: 168

Answers (2)

Cyprian
Cyprian

Reputation: 9453

Using SBJson:

NSString *json = @"{lhs: "2 U.S. dollars",rhs: "89.7988506 Indian rupees",error: "",icc: true}"

NSDictionary *jsonDict = [json JSONValue];

NSString *lhs = [jsonDict objectForKey:@"lhs"];
NSString *rhs = [jsonDict objectForKey:@"rhs"];
...

Upvotes: 1

alloc_iNit
alloc_iNit

Reputation: 5183

Here is the tutorial to help you out...

Upvotes: 0

Related Questions