在Objective-C中解析php

how can I parse php file:

var data = { "count" : "22", "objects": [{"id" : "23", "name" : "NAME", "photo" : "http://link", "morning" : "1", "day" : "1", "evening" : "1", "night" : "0"} ]};

in xcode for ios app

thx

  1. First, Why do you need to parse a PHP file in iOS app?
  2. If you need to parse a response in JSON format from a PHP Webservice you can use this library https://github.com/MantleFramework/Mantle (It's a cocoapod too).
  3. If I'm wrong and you really need to parse a PHP file to objective-c you need to see something about compilers.

To complement the second point you also can use the NSDictionary or NSArray as below: Parsing Plain JSON Array in Objective C