是否有可用于转换的命令行工具.plist文件到JSON?

If not, what would be the approach for creating one using Objective-C or C on a Mac? For instance, there is JSONKit, for Objective-C. How would one go about opening a .plist file, pass it to JSONKit, and serialize that as JSON?

推荐答案

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

如 comments 中所述,这将覆盖现有数据.输出到新文件

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

Json相关问答推荐

时间序列的Vega Lite分组条形图

GO KaZaam转换返回意外结果

属性错误:';ActivitiesClient';对象没有属性';base_url';

将PostgreSQL转换为JSON对象

错误解析错误:意外令牌:在我的 .eslintrc.json 文件中.为什么?

使用 jq 工具将文本从 txt 文件转换为 json

jq - 将父键值提取为子元素旁边的逗号分隔值

jolt 通配符如何用于 RHS?

如果值不存在,则将值插入 JSON 数组

使用带有逗号的字段名称构建 struct

坚持弄清楚如何使用 api 响应来调用以从不同的链接检索响应

在 json 嵌入的 YAML 文件中 - 使用 Python 仅替换 json 值

Microsoft GRAPH 查询使用端点 /deviceManagement/deviceHealthScripts 列出了一种不熟悉的检测脚本内容格式

Angular 2/Web Api - json 解析错误语法错误意外结束输入

如何在 Eclipse 中安装和使用 JSON 编辑器?

验证和格式化 JSON 文件

json和空数组

Retrofit2.0 得到 MalformedJsonException 而 json 似乎正确?

在 React 中访问子级的父级状态

Python 到 JSON 序列化在十进制上失败