Is there a command line tool available for converting .plist files to JSON?
If not, what would be the approach for creating one using Objective-C or C on a Mac? For
There is a native way, to convert plist's to json. It's called NSJSONSerialization.
Here is an example on how to use it, and convert a plist file to a json file:
NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:@"input.plist"];
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:plistDict options:NSJSONWritingPrettyPrinted error:&error];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
[jsonString writeToFile:@"output.json" atomically:NO encoding:NSUTF8StringEncoding error:&error];