1.安装Package control
首先需要安装Package control,如果已经安装请跳过此步骤。按Ctrl+Shift+p打开命令搜索框,输入PC,点击图中条目安装,如下图:
![](http://upload-images.jianshu.io/upload_images/595349-d1d51dbaba512882.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/813/format/webp)
成功后弹出对话框如下:
![](http://upload-images.jianshu.io/upload_images/595349-6de9c560f697e7e9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/403/format/webp)
2.安装PrettyJson
按Ctrl+Shift+p
打开命令搜索框,输入PCI,打开package安装搜索框
![](http://upload-images.jianshu.io/upload_images/595349-29141ccfaf13aded.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/814/format/webp)
搜索PrettyJson,点击Pretty JSON安装,如下图:
![](http://upload-images.jianshu.io/upload_images/595349-bf63a9ae2e6d9c41.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/812/format/webp)
3.格式化
按Ctrl+Alt+J
就可格式化json数据了
![](http://upload-images.jianshu.io/upload_images/595349-f35bb9b96964d66b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/322/format/webp)
转载链接:https://www.jianshu.com/p/8d5362c15312