├── .eslintignore ├── .gitignore ├── assets ├── json.gif ├── zain.png ├── json-z.png ├── function1.png ├── function2.png └── function3.png ├── docs ├── DEVELOPMENT.md └── CHANGELOG.md ├── resources ├── json-128.png ├── json-500.png ├── light │ ├── document.svg │ ├── edit.svg │ ├── folder.svg │ ├── boolean.svg │ ├── dependency.svg │ ├── refresh.svg │ ├── number.svg │ └── string.svg └── dark │ ├── edit.svg │ ├── document.svg │ ├── folder.svg │ ├── boolean.svg │ ├── dependency.svg │ ├── refresh.svg │ ├── number.svg │ └── string.svg ├── .vscodeignore ├── tsconfig.json ├── .vscode ├── extensions.json ├── tasks.json ├── settings.json └── launch.json ├── .eslintrc.js ├── src ├── extension.ts └── json │ └── jsonTree.ts ├── LICENSE.md ├── .github └── workflows │ └── production.yml ├── README.md └── package.json /.eslintignore: -------------------------------------------------------------------------------- 1 | vscode.proposed.d.ts -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | node_modules 3 | 4 | *.vsix 5 | -------------------------------------------------------------------------------- /assets/json.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/assets/json.gif -------------------------------------------------------------------------------- /assets/zain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/assets/zain.png -------------------------------------------------------------------------------- /docs/DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | https://marketplace.visualstudio.com/manage/publishers/zainchen 2 | -------------------------------------------------------------------------------- /assets/json-z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/assets/json-z.png -------------------------------------------------------------------------------- /assets/function1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/assets/function1.png -------------------------------------------------------------------------------- /assets/function2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/assets/function2.png -------------------------------------------------------------------------------- /assets/function3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/assets/function3.png -------------------------------------------------------------------------------- /resources/json-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/resources/json-128.png -------------------------------------------------------------------------------- /resources/json-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZainChen/vscode-json/main/resources/json-500.png -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | test/** 5 | src/** 6 | **/*.map 7 | .gitignore 8 | tsconfig.json 9 | assets 10 | docs 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es2020", 5 | "lib": ["es2020"], 6 | "outDir": "out", 7 | "sourceMap": true, 8 | "rootDir": "src", 9 | "strict": true 10 | }, 11 | "exclude": [ 12 | "node_modules", 13 | ".vscode-test" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | 5 | // List of extensions which should be recommended for users of this workspace. 6 | "recommendations": [ 7 | "dbaeumer.vscode-eslint" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /resources/light/document.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/dark/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | "typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version 10 | "typescript.tsc.autoDetect": "off", 11 | "editor.insertSpaces": false, 12 | "cSpell.words": [ 13 | "autorefresh" 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | /**@type {import('eslint').Linter.Config} */ 2 | // eslint-disable-next-line no-undef 3 | module.exports = { 4 | root: true, 5 | parser: '@typescript-eslint/parser', 6 | plugins: [ 7 | '@typescript-eslint', 8 | ], 9 | extends: [ 10 | 'eslint:recommended', 11 | 'plugin:@typescript-eslint/recommended', 12 | ], 13 | rules: { 14 | 'semi': [2, "always"], 15 | '@typescript-eslint/no-unused-vars': 0, 16 | '@typescript-eslint/no-explicit-any': 0, 17 | '@typescript-eslint/explicit-module-boundary-types': 0, 18 | '@typescript-eslint/no-non-null-assertion': 0, 19 | '@typescript-eslint/no-namespace': 0, 20 | 'no-inner-declarations': 0, 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /resources/dark/document.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/folder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/dark/folder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import * as vscode from 'vscode'; 4 | import { JsonTreeProvider } from './json/jsonTree'; 5 | 6 | export function activate(context: vscode.ExtensionContext) { 7 | const jsonTreeProvider = new JsonTreeProvider(context); 8 | vscode.window.createTreeView('jsonTree', { treeDataProvider: jsonTreeProvider, showCollapseAll: true }); 9 | vscode.commands.registerCommand('jsonTree.refresh', () => jsonTreeProvider.refresh()); 10 | vscode.commands.registerCommand('jsonTree.refreshNode', offset => jsonTreeProvider.refresh(offset)); 11 | vscode.commands.registerCommand('jsonTree.renameNode', offset => jsonTreeProvider.rename(offset)); 12 | vscode.commands.registerCommand('extension.openJsonSelection', range => jsonTreeProvider.select(range)); 13 | } 14 | -------------------------------------------------------------------------------- /resources/dark/boolean.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/dark/dependency.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/boolean.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/dependency.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/dark/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | { 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": [ 11 | "--extensionDevelopmentPath=${workspaceRoot}", 12 | "--enable-proposed-api", 13 | "vscode-samples.custom-view-samples" 14 | ], 15 | "sourceMaps": true, 16 | "outFiles": [ 17 | "${workspaceRoot}/out/**/*.js" 18 | ], 19 | "preLaunchTask": "npm: watch" 20 | }, 21 | { 22 | "type": "node", 23 | "request": "attach", 24 | "name": "Attach to Extension Host", 25 | "port": 5870, 26 | "restart": true, 27 | "outFiles": [ 28 | "${workspaceRoot}/out" 29 | ] 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Json for Visual Studio Code 2 | 3 | ## Version 2.0.2 November 08, 2020 4 | 5 | ### New Features 6 | 7 | - / 8 | 9 | ### Bug Fixes 10 | 11 | - Fix repository url and readme. 12 | 13 | --- 14 | 15 | ## Version 2.0.1 September 05, 2020 16 | 17 | ### New Features 18 | 19 | - / 20 | 21 | ### Bug Fixes 22 | 23 | - Fix node.children is not iterable. 24 | 25 | --- 26 | 27 | ## Version 2.0.0 September 04, 2020 28 | 29 | ### New Features 30 | 31 | - Add content count. 32 | - Use TypeScript. 33 | 34 | ### Bug Fixes 35 | 36 | - / 37 | 38 | --- 39 | 40 | ## Version 1.0.4 January 20, 2020 41 | 42 | ### New Features 43 | 44 | - / 45 | 46 | ### Bug Fixes 47 | 48 | - Fix sidebar icons. 49 | 50 | --- 51 | 52 | ## Version 1.0.1 February 28, 2019 53 | 54 | ### New Features 55 | 56 | - Add menu node one-click folding function. 57 | 58 | ### Bug Fixes 59 | 60 | - Solve the problem that vscode-json can't display. 61 | 62 | --- 63 | 64 | ## Version 1.0.0 February 28, 2019 65 | 66 | ### New Features 67 | 68 | - Add json view 69 | 70 | ### Bug Fixes 71 | 72 | - null 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 ZainChen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/production.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to GitHub - Prod Stage 2 | 3 | permissions: 4 | contents: write 5 | 6 | on: 7 | push: 8 | branches: 9 | - production 10 | 11 | jobs: 12 | build: 13 | runs-on: ${{ matrix.os }} 14 | 15 | strategy: 16 | matrix: 17 | os: [macos-latest] 18 | 19 | steps: 20 | - name: Checkout git repo 21 | uses: actions/checkout@v4 22 | 23 | - name: Setup Node.js 24 | uses: actions/setup-node@v4 25 | with: 26 | node-version: '20' 27 | 28 | - name: Install dependencies 29 | run: npm install 30 | 31 | - name: Build 32 | run: npm run build 33 | 34 | - name: Package 35 | run: npm run package 36 | 37 | - name: Get version from package.json 38 | id: package 39 | run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT 40 | 41 | - name: Release 42 | uses: softprops/action-gh-release@v2 43 | with: 44 | tag_name: vscode-json-v${{ steps.package.outputs.version }} 45 | files: json-${{ steps.package.outputs.version }}.vsix 46 | -------------------------------------------------------------------------------- /resources/dark/number.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/number.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/dark/string.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/light/string.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Json for Visual Studio Code 2 | [](https://marketplace.visualstudio.com/items?itemName=ZainChen.json) 3 | [](https://marketplace.visualstudio.com/items?itemName=ZainChen.json) 4 | [](https://marketplace.visualstudio.com/items?itemName=ZainChen.json) 5 | 6 | This extension adds json support for Visual Studio Code. 7 | 8 | # About 9 | 10 | GitHub: https://github.com/ZainChen/vscode-json 11 | 12 |
vscode-json v2.0.2
13 |




55 |
56 |
57 |
58 | |
59 |
60 |
61 |
62 |
63 | |
64 |
65 |
66 |
67 |
68 | |
69 |
72 |
73 |
74 |
75 | |
76 |
77 |
78 |
79 |
80 | |
81 |
82 |
83 |
84 |
85 | |
86 |