开发者

Parse JSON in iphone application with json-framework

开发者 https://www.devze.com 2023-03-26 16:21 出处:网络
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 urlhttp://www.google.com/calculator?. I want to send my all

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.


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"];
...


Here is the tutorial to help you out...

0

精彩评论

暂无评论...
验证码 换一张
取 消