Command-line tool for converting PLIST to JSON?

后端 未结 7 1626
粉色の甜心
粉色の甜心 2020-12-12 10:47

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

7条回答
  •  醉话见心
    2020-12-12 10:55

    If you are on a Mac you can use the plutil tool on the command line (this comes with the developer tools I believe):

    plutil -convert json Data.plist
    

    as mentioned in the comments, this will overwrite the existing data. To output to a new file

    plutil -convert json -o Data.json Data.plist
    

提交回复
热议问题