0

I'm working on a JSON response from a server, and in the response data, among other things, should be a "credits" property, which is an int, which should have the value of 2000. However, if I try to use this property, I get a value like 180988576. But, if I "print description" of the property from the debugger, it says:

Printing description of playerData->_credits:
2000

How do I access this value?

4

1 回答 1

2

What you have to do is , When you are fetching the value from JSON

use like this :

[[JSON ObjectForKey:@"Key"]integerValue];

It will give you the correct result. Try it once. You can assign that value to an integer variable.

于 2013-03-11T08:50:01.953 回答