
Sublime Text 格式化Json文件 之 Pretty Json
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json

·
需要使用到 Pretty Json
插件。
一、安装方法
- sublime 下,按快捷键
Comand + control + p
, 输入install Package
,然后回车
- 等几秒钟,加载启动进程完毕后
- 弹出的页面中输入
pretty json
, 然后回车
- 等待几秒钟,可以查看Sublime 最下面的 进度 日志,表示安装完毕。
二、使用方法:
- 顶部菜单
Sublime Text
->Settings...
->Key Bindings
- 左边文件是默认快捷键,不能修改。 右边是用户自定义文件,我们修改其中的内容为
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json
[
{ "keys": ["command+i"], "command": "pretty_json" },
{ "keys": ["command+shift+j"], "command": "pretty_json" },
]
并保存。
代表我们 按 command+i
或command+shift+j
就可以触发 格式化json, (这个快捷键和XCode 的快捷键一致), 可以随便更改为其他的快捷键。
这里使用两个快捷键为了以防忘记其中一个,两个都可以生效。
- 打开
json
文件
- 按
command+i
快捷键,触发格式化, 最终格式化为:
推荐内容




适用于现代 C++ 的 JSON。
最近提交(Master分支:6 个月前 )
4424a0fc
Signed-off-by: Niels Lohmann <mail@nlohmann.me> 4 天前
11aa5f94
* Make std::filesystem::path conversion to/from UTF-8 encoded JSON string explicit.
Signed-off-by: Richard Musil <risa2000x@gmail.com>
* Experimental: Changing C++ standard detection logic to accommodate potential corner cases.
Signed-off-by: Richard Musil <risa2000x@gmail.com>
* Drop C++ standard tests for compilers which do not implement required features.
Signed-off-by: Richard Musil <risa2000x@gmail.com>
* Drop C++ standard tests for MSVC versions which do not implement required features.
Signed-off-by: Richard Musil <risa2000x@gmail.com>
---------
Signed-off-by: Richard Musil <risa2000x@gmail.com>
Co-authored-by: Richard Musil <risa2000x@gmail.com> 5 天前
更多推荐
相关推荐
查看更多
json

适用于现代 C++ 的 JSON。
json

An efficient JSON decoder
json

C++ header-only JSON library
目录
所有评论(0)