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.

Answer from Martin Aeschlimann on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › languages › json
Editing JSON with Visual Studio Code
November 3, 2021 - The association of a JSON file to a schema can be done either in the JSON file itself using the $schema attribute, or in the User or Workspace settings (File > Preferences > Settings) under the property json.schemas Open in VS Code Open in VS ...
🌐
GitHub
github.com › microsoft › vscode › issues › 76744
json schema defined in local file configured via json.schema in user settings.json is ignored · Issue #76744 · microsoft/vscode
June 4, 2019 - Move the same json.schemas configuration to the workspace .vscode/settings.json and the same Json file immediately starts being validated by the schema.
Author   jan-dolejsi
Discussions

How do I configure VS Code to enable code completion on .json files (jsonschema support)? - Stack Overflow
Good point so here is the resource ... a JSON file code.visualstudio.com/docs/languages/json#_mapping-in-the-json 2019-08-08T13:23:39.853Z+00:00 ... Schema ids are just URIs. So unless VSCode can lookup the schema from some global server or read the id itself as a URL, this may not work. 2019-08-21T19:10:17.59Z+00:00 ... @ChristopherBarber, VS Code and VS downloads the schema from server or local file and it ... More on stackoverflow.com
🌐 stackoverflow.com
visual studio code - VSCode jsonValidation using local schema files - Stack Overflow
The documentation for contributes.jsonValidation says: The url value can be either a local path to a schema file included in the extension or a remote server URL such as a json schema store. The ... More on stackoverflow.com
🌐 stackoverflow.com
How can I validate JSON in VS Code using a schema file defined in the workspace? - Stack Overflow
Unable to load schema from ... no such file or directory, open 'c:\json-schema\device_plugin_data_schema.json'. It is supposed to use relative path but it is not?! ... If you want to use a relative path to something in a workspace folder for the url property of a JSON schema setting item, you need to define that setting in the workspace settings (/.vscode/settings.json) ... More on stackoverflow.com
🌐 stackoverflow.com
Using JSON Schema in Visual Studio Code for `ida-plugin.json`
Visual Studio Code provides out of the box support for JSON files, including features like validation and auto-completion. To enhance your experience with the ida-plugin.json file, you can use a JSON schema that defines the structure and constraints of the file. More on community.hex-rays.com
🌐 community.hex-rays.com
0
2
July 20, 2025
🌐
GitHub
github.com › microsoft › vscode › issues › 174672
Map JSON schema URLs to local file · Issue #174672 · microsoft/vscode
February 17, 2023 - I don't want to list all the JSON data files in fileMatch entries in my settings.json (because that would be hard to maintain), and rather want to add something like "$schema": "http://thecompany.com/schemas/foo_project/bar_schema.json" to each JSON data file. But I cannot make that URL resolvable (I cannot put files onto our website); so I'd like to specify somewhere that JSON schema URL http://thecompany.com/schemas/foo_project/bar_schema.json should resolve to the ./schemas/bar_schema.json file in the current project.
Author   oliver
🌐
Joshuatz
docs.joshuatz.com › cheatsheets › js › json-schema
JSON Schema - Resources, Notes, and VSCode Tips | Joshua's Docs
This is how bundled language extensions that come with VSCode, like configuration-editing, internally contribute schema resolvers (example) Note: For the $schema or url value, the path to the schema file does not have to be local; many extensions and plugins use a public URL, such as http://json.schemastore.org/eslintrc.
Find elsewhere
🌐
Netlify
nickymeuleman.netlify.app › blog › json-schema
JSON-schemas are awesome - Nicky Meuleman - Netlify
December 19, 2018 - // in VSCode workspace settings .json file (ctrl/cmd+shift+p to search for it) ... A schema doesn’t need to be remote. You can also link your file of choice to a self written and/or local schema.
🌐
YouTube
youtube.com › code 2020
VS Code tips — JSON schemas for IntelliSense - YouTube
Set the "$scheme" property in any json file to apply a schema to it. Schemas validate your json and provide IntelliSense while writing it.The "$schema" can b...
Published   November 15, 2020
Views   17K
🌐
Read the Docs
vscode-docs.readthedocs.io › en › stable › languages › json
Json - vscode-docs
JSON schemas are identified by an http or https location URL, servers like http://schemastore.org provide schemas for most of the common JSON based configuration files.
🌐
DEV Community
dev.to › brpaz › how-to-create-your-own-auto-completion-for-json-and-yaml-files-on-vs-code-with-the-help-of-json-schema-k1i
How to create your own auto-completion for JSON and YAML files on VS Code with the help of JSON Schema - DEV Community
April 27, 2020 - Probably the best way to start is to look at the project documentation or for example files. Some projects provide example files with all the possible values and you can infer the schema from there. In the case of Hadolint we can get everything needed from the project Readme. Next, we will create an hadolint.json file with the schema specification.
🌐
Frontaid
frontaid.io › blog › json-schema-vscode
How to set up JSON Schema with VSCode
The settings.json will be opened with the corresponding setting already prefilled. The fileMatch property is a list of file name patters that should be validated against the schema. The url property allows you to define the address of the schema. As currently only local files seem to work, you have to point it to the right path prefixed by file:.
🌐
CodeGenes
codegenes.net › blog › vscode-unable-to-load-schema-for-package-json
VS Code Error: Unable to Load Schema for package.json (Local File Issue) – How to Fix & Resolve
What Causes the “Unable to Load Schema” Error (Local File Issues)? ... VS Code uses JSON schemas to validate package.json. By default, it fetches the official package.json schema from the JSON Schema Store (a remote server).
🌐
Hex-rays
community.hex-rays.com › ida general
Using JSON Schema in Visual Studio Code for `ida-plugin.json` - IDA General - Hex-Rays Community forum
July 20, 2025 - Visual Studio Code provides out of the box support for JSON files, including features like validation and auto-completion. To enhance your experience with the ida-plugin.json file, you can use a JSON schema that defines …
🌐
Linkedlist
linkedlist.ch › json-schema-vscode_74
How to set up JSON Schema with VSCode - linkedlist
The settings.json will be opened with the corresponding setting already prefilled. The fileMatch property is a list of file name patters that should be validated against the schema. The url property allows you to define the address of the schema. As currently only local files seem to work, you have to point it to the right path prefixed by file:.
🌐
GitHub
github.com › microsoft › vscode › issues › 7730
[json] Referencing **local** JSON schema from another local schema · Issue #7730 · microsoft/vscode
June 15, 2016 - document1.json is associated to schema1.json through json.schemas association in .vscode/settings.json (this should be irrelevant), similar for ...2.json doc/schema.
Author   ddotlic