Parse JSON in iphone application with json-framework

后端 未结 2 1664
醉酒成梦
醉酒成梦 2021-01-26 17:32

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 sen

相关标签:
2条回答
  • 2021-01-26 17:53

    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"];
    ...
    
    0 讨论(0)
  • 2021-01-26 17:56

    Here is the tutorial to help you out...

    0 讨论(0)
提交回复
热议问题