How do I configure VS Code to enable code completion on .json files (jsonschema support)?

The association of JSON schemas to files is done in the settings (File, Preferences, User Settings or Workspace Settings), under the property ‘json.schemas’.

This is an example how the JSON schema for bower is associated to the bower schema.

"json.schemas": [
    {
        "fileMatch": [
            "/bower.json",
            "/.bower.json"
        ],
        "url": "http://json.schemastore.org/bower"
    },
    ...

You can also use schemas located in your workspace or define a schema right in the settings itself. Check https://code.visualstudio.com/docs/languages/json for examples.

Leave a Comment