Alexander Mills
Alexander Mills

Reputation: 100250

Best tool for .json file schema validation

There are probably a lot of tools/libraries to validate JSON schemas. I have a library and want users of my library to have configuration files that match the expected API.

Using Webstorm, the IDE will tell me that my Webpack config file schema is incorrect, something like this:

enter image description here

The Webpack files that are responsible are here:

https://github.com/webpack/webpack/blob/master/schemas/webpackOptionsSchema.json

Integration with existing IDEs like Webstorm, VSCode, Atom, ST3, etc, would be a huge plus.

I haven't figured out how to do this right...anybody know?

Upvotes: 3

Views: 1225

Answers (1)

Omkar More - MSFT
Omkar More - MSFT

Reputation: 296

To integrate with various IDEs, consider uploading your json schema to JSON Schema Store.

Here is the GitHub Repo https://github.com/SchemaStore/schemastore

This contains json schemas for many well known json files and gets integrated with Visual Studio and VS Code easily.

Also look at step by step integrations steps for Visual Studio https://scottaddie.com/2016/08/02/community-driven-json-schemas-in-visual-studio-2015/

Upvotes: 2

Related Questions