Objective-C JSON Boolean

I have parsed a json object that has the following structure:

{
    data = "<null>";
    "error_type" = "INPUT_ERROR";
    msg = "Missing field parameter";
    success = 0;
}

I'm trying to do a compariosn to see whether success is true or false, however it dosnt work and gives me a warning saying you can't compare a pointer as a integer. I've also tried NO and YES.

Anyhelp would be greatly appreciated.

Answers


I believe success is likely being cast to a NSNumber. Try [success boolValue].


Need Your Help

Separate the string and send the string values to list in java

java javascript jsp jstl

I have a list questionForm and it contains question_id,question,options and I have taken options as a string separated by | symbol. Can anyone give me solution such that separate the string and dis...

IE 8 JQuery .find() not working on XML string

jquery xml soap internet-explorer-8 find

JQuery does not seem to be able to find my selector string inside of a returned XML string. It appears to be working in Chrome, but I can't debug in the same environment due to browser authentication