.json文件架构验证的最佳工具

时间:2017-04-16 03:29:51

标签: json webpack jsonschema json-schema-validator

可能有很多工具/库来验证JSON模式。 我有一个库,希望我的库用户拥有与预期API匹配的配置文件。

使用Webstorm,IDE会告诉我我的Webpack配置文件架构不正确,如下所示:

enter image description here

负责的Webpack文件在这里:

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

与Webstorm,VSCode,Atom,ST3等现有IDE的集成将是一个巨大的优势。

我还没弄明白如何做到这一点......任何人都知道吗?

1 个答案:

答案 0 :(得分:1)

要与各种IDE集成,请考虑将json架构上传到JSON Schema Store

这是GitHub回购 https://github.com/SchemaStore/schemastore

这包含许多众所周知的json文件的json模式,并且可以轻松地与Visual Studio和VS Code集成。

另请参阅Visual Studio的逐步集成步骤 https://scottaddie.com/2016/08/02/community-driven-json-schemas-in-visual-studio-2015/

相关问题