开发者

Need help parsing JSON in iphone application

开发者 https://www.devze.com 2023-03-27 05:34 出处:网络
I want to send integer data through textfield to the json server and whatever calculated result will be provide 开发者_Python百科server that result i want to display in my label field.

I want to send integer data through textfield to the json server and whatever calculated result will be provide 开发者_Python百科server that result i want to display in my label field. How is it possible? Pls, provide me any code how will i send integer data to the server ? And how will i parse that result by use of json parsing ? And how will I display that result in my label field?


You will have to convert int into string first. You can convert int into string as NSSting *str = [NSString stringwithFormat:@"%d",yourint];

okay than These are the links which can be helpful to you.

tutorial

same post


Why don't you use JSON Framework?


Here is the tutorial to help you out..

To replace space with "," (comma character), following code will do.

    NSString *targetString = @"1000 USD= 44 986.6"; 
    NSString *str = [targetString stringByReplacingOccurrencesOfString:@" " withString:@","];
0

精彩评论

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

关注公众号