Is there any tool which can convert my PLIST into JSON. I do not have much idea on JSON formatting. I have a PLIST for which I want an equivalent JSON file.
Also, how do we process JSON response on iOS client using objective C. I have worked with PList response so far.
The best way to do this (on os x) is to use a command line tool, plutil.
It's used like this:
These are the options for after '-convert': xml1, binary1,json. For this we'll use json. For this command you'll have to be in the same directory as the plist file. For this test we'll convert test.plist (an xml file created by xcode in xml format) into json. It will create a file named test.json:
to convert it back we'd go:
Others have previously asked about converting .plist files to json here.
Once you have your data in a json format, you can then use Apple's
NSJSONSerialization
class, documented here:There are other libraries you can use, though, some of which you will find in the answers to this question.