5.3.10 • Published 28 days ago

vscode-json-languageservice v5.3.10

Weekly downloads
317,422
License
MIT
Repository
github
Last release
28 days ago

vscode-json-languageservice

JSON language service extracted from VSCode to be reused, e.g in the Monaco editor.

npm Package NPM Downloads Build Status License: MIT

Why?

The vscode-json-languageservice contains the language smarts behind the JSON editing experience of Visual Studio Code and the Monaco editor.

  • doValidation analyses an input string and returns syntax and lint errors.
  • doComplete provides completion proposals for a given location.
  • doResolve resolves a completion proposals.
  • doHover provides a hover text for a given location.
  • findDocumentSymbols provides all symbols in the given document.
  • findDocumentColors provides all color symbols in the given document.
  • getColorPresentations returns available color formats for a color symbol.
  • format formats the code at the given range.
  • getFoldingRanges gets folding ranges for the given document.
  • getSelectionRanges gets selection ranges for a given location.
  • getMatchingSchemas matches a document against its schema and returns all AST nodes along with the matching sub schemas.
  • parseJSONDocument creates a JSON document from source code.
  • newJSONDocument creates a JSON document from an AST.

For the complete API see jsonLanguageService.ts and jsonLanguageTypes.ts

Installation

npm install --save vscode-json-languageservice

Sample usage

See sample.ts for an example on how to use the JSON language service.

To run the sample use yarn sample

Development

git clone https://github.com/microsoft/vscode-json-languageservice
cd vscode-json-languageservice
yarn

Use yarn test to compile and run tests

How can I run and debug the service?

  • open the folder in VSCode.
  • set breakpoints, e.g. in jsonCompletion.ts
  • run the Unit tests from the run viewlet and wait until a breakpoint is hit: image

How can I run and debug the service inside an instance of VSCode?

  • run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute
  • use yarn link vscode-json-languageservice in vscode/extensions/json-language-features/server to run VSCode with the latest changes from vscode-json-languageservice
  • run VSCode out of source (vscode/scripts/code.sh|bat) and open a .json file
  • in VSCode window that is open on the vscode-json-languageservice sources, run command Debug: Attach to Node process and pick the code-oss process with the json-language-features path image
  • set breakpoints, e.g. in jsonCompletion.ts
  • in the instance run from sources, invoke code completion in the .json file
@mulverinex/trident-language-server@nevmn/vscode-json-languageserver@hopara/http-server@infinitebrahmanuniverse/nolb-vsc@everything-registry/sub-chunk-3069amazon-states-language-serviceant-editor@alibaba-aero/eslint-plugin-json@workbench-stack/default-languages-server@workbench-stack/ext-default-languages-serverace-lintersacode-lsp@1yefuwang1/yaml-language-serverarmvalarmvalidationclibi-ace-editoraws-ssm-document-language-service@cfstratos/monaco-yamlbravo-editordfeuk-frontenddfeuk-frontend-manualdevops-as-code-language-serverdevops-as-code-language-server2nxlscoc-homeassistant@diesel-parser/monacomonaco-languageclient-examplesdatapack-language-serveryaml-language-serveryaml-language-service@uni-helper/volar-plugin-uni-pages@uni-helper/volar-service-uni-pages@spgoding/datapack-language-server@volar-plugins/json@volar-plugins/vue-json@volar/vue-language-service@biu/jsonlintazure-pipelines-language-servicerx-json-ui-clieslint-plugin-check-json-valueeslint-plugin-jsoneslint-plugin-json-betaeslint-plugin-prodperfectqa-skip-json@hawkingnetwork/react-native-tab-view@hackercat/yaml-language-serverliquid-language-server@invopop/gobl-builderreact-solid-gradient-picker@flexget/monaco-yaml@kocan-plugins/json@kocan/kdu-language-service@kocan/language-service@kie-tools/dashbuilder-language-service@kie-tools/json-yaml-language-service@kie-tools/serverless-workflow-language-service@kie-tools/yaml-language-server@kie-tools/yard-language-servicefluid-grunt-lint-all@lambo-design/monaco-editorgpii-grunt-lint-all@magicjs.dev/runtime@nightgale/volar-service-pageshome-assistant-language-servicetypefox-monacovscode-vue-languageservicevscode-yaml-languageservicevscode-yaml-toolsvscode-stacktapevscode-mc-languageservervscode-langservers-extractedvscode-json-languageservervscode-json-languageserver-binvscode-json-ls-binjsonld-lintvolar-plugin-vue-routervolar-service-jsonvue-language-service-with-kebab@shopify/theme-check-common@shopify/theme-language-server-common@sap/fiori-json-services@sap/di.code-validation.json@serverless-ide/config@serverless-ide/language-server@serverless-devs/yaml-language-server
5.3.10

28 days ago

5.3.9

3 months ago

5.3.7

6 months ago

5.3.6

8 months ago

5.3.3

12 months ago

5.3.2

1 year ago

5.3.1

1 year ago

5.3.0

1 year ago

5.1.4

1 year ago

5.2.0

1 year ago

5.3.5

11 months ago

5.3.4

12 months ago

5.1.3

1 year ago

5.1.2

1 year ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.2.1

2 years ago

4.2.0-next.3

2 years ago

4.2.0

2 years ago

4.2.0-next.0

2 years ago

4.2.0-next.1

2 years ago

4.2.0-next.2

2 years ago

4.1.10

2 years ago

4.1.9

2 years ago

4.1.8

3 years ago

4.1.7

3 years ago

4.1.6

3 years ago

4.1.5

3 years ago

4.1.4

3 years ago

4.1.3

3 years ago

4.1.0

3 years ago

4.1.2

3 years ago

4.0.1

3 years ago

4.0.2

3 years ago

4.0.0

3 years ago

3.11.0

3 years ago

3.10.0

3 years ago

3.9.1

4 years ago

3.9.0

4 years ago

3.8.5

4 years ago

3.8.4

4 years ago

3.8.3

4 years ago

3.8.2

4 years ago

3.8.1

4 years ago

3.8.0

4 years ago

3.7.0

4 years ago

3.6.0

4 years ago

3.5.2

4 years ago

3.5.1

4 years ago

3.4.12

4 years ago

3.4.11

4 years ago

3.4.10

4 years ago

3.4.9

4 years ago

3.4.8

4 years ago

3.4.7

4 years ago

3.4.6

4 years ago

3.4.5

4 years ago

3.4.4

4 years ago

3.4.3

4 years ago

3.4.1

4 years ago

3.4.0

4 years ago

3.3.5

5 years ago

3.3.4

5 years ago

3.3.3

5 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.3.0-next.7

5 years ago

3.3.0-next.6

5 years ago

3.3.0-next.5

5 years ago

3.3.0-next.4

5 years ago

3.3.0-next.3

5 years ago

3.3.0-next.2

5 years ago

3.3.0-next.1

5 years ago

3.3.0-next.0

5 years ago

3.2.1

5 years ago

3.2.0

6 years ago

3.2.0-next.2

6 years ago

3.2.0-next.1

6 years ago

3.1.7

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.2-next.3

6 years ago

3.1.2-next.2

6 years ago

3.1.2-next.1

6 years ago

3.1.0

6 years ago

3.0.13

6 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.22

7 years ago

2.0.21

7 years ago

2.0.20

7 years ago

2.0.19

7 years ago

2.0.18

7 years ago

2.0.17

7 years ago

2.0.16

7 years ago

2.0.15

7 years ago

2.0.14

7 years ago

2.0.13

7 years ago

2.0.12

7 years ago

2.0.11

7 years ago

2.0.10

7 years ago

2.0.9

7 years ago

2.0.8

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

2.0.0-next.12

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

2.0.0-next.11

7 years ago

2.0.0-next.10

7 years ago

2.0.0-next.9

7 years ago

2.0.0-next.8

7 years ago

2.0.0-next.7

7 years ago

2.0.0-next.6

7 years ago

2.0.0-next.5

7 years ago

2.0.0-next.4

7 years ago

2.0.0-next.3

7 years ago

2.0.0-next.2

7 years ago

2.0.0-next.1

7 years ago

1.1.8-next.2

8 years ago

1.1.8-next.1

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5-next.2

8 years ago

1.1.5-next.1

8 years ago

1.1.4

8 years ago

1.1.3-next.7

8 years ago

1.1.3-next.6

8 years ago

1.1.3-next.5

8 years ago

1.1.3-next.4

8 years ago

1.1.3-next.3

8 years ago

1.1.3-next.2

8 years ago

1.1.3-next.1

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago