2

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.

1 Answer 1

11

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

Sign up to request clarification or add additional context in comments.

3 Comments

Should mention I'm assuming you're using a library such as TouchJSON.
@Ian Livingstone: Make sure to accept the answer! (click the checkbox below the vote count)
I will; has a ten minute timer makes me sad :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.