Skip to content

JSON language server

Sergey Skorik edited this page Sep 10, 2018 · 3 revisions

Preconditions:

  1. Create workspace from the Node stack with nodejs-hello-world project.
  2. Enable JSON language server in the Installers tab and start the workspace.

Testing process

  • Language server initialization
  1. From the project open "package.json" file.
  2. Check Finished language servers initialization, file path '/nodejs-hello-world/package.json' message in the dev-machine console.
  • Code validation feature
  1. Open "package.json" file.
  2. Remove , symbol in line 8. Make sure that error marker appears. Click on the marker and check message like Expected '(end)' and instead saw ':'.in the proposal window.
  3. Hover mouse on "author" text and wait for hover popup with Expected comma or closing brace text. Return the just deleted coma and wait disappearance of the marker.
  4. Go to the line 9 and add fragment like: "newObj":[1,2,3],. Make sure that json file does not have any errors.
  5. Add this object again and check error marker with Duplicate object key message. Delete just add object and check wait disappearance of the marker.
  6. Go to the line 6 and press ENTER. Add "newObj":[1,2,3], object and check there is not any errors.
  • Hover feature ?

  • Autocomplete feature ?

  • Go To Symbol

  1. Open "package.json" file.
  2. Start Go To Symbol feature by Ctrl+F12 buttons or from Assistant menu.
  3. Wait for Go To Symbol form is opened with next lines:
name symbols(10)
version
description
main
scripts
test
author
license
dependencies
express
  1. Click on any of them and check that it correctly selected in file.