json - 如何让 Visual Studio 2013 使用自定义 JSON 架构?

标签 json visual-studio-2013 jsonschema

我正在从事一个涉及使用 JSON 来存储和检索数据的项目;为了编写一些示例数据,我正在使用 VS2013 的 JSON 编辑器,据推测,它支持使用任意 JSON 模式作为其 Intellisense 代码完成功能。但是,我无法让它识别任何未通过网站访问的模式,例如http://json-schema.org/draft-04/schema工作正常但/JSON/mySchema.json 没有。

它不会从 $schema 标签加载/JSON/mySchema.json,也不允许我输入它的名字;每当我将它输入模式框并按回车键时,它会将模式框返回到“未选择模式”。

如何让 VS2013 识别我的自定义架构并从中生成 Intellisense 补全?

最佳答案

我了解到(通过此功能公告页面上的评论)使用 JSON 模式的相对路径目前在 Visual Studio 2013 Update 3 中存在漏洞;

"[...] the relative $schema path is not working in a non-web project and will be fixed in Update 4."

(来自对 this page 的评论)

它应该可以很好地使用绝对路径,但当然那是不可移植的。 Update 4 应该很快就会出来; RC已经出来了,可以查资料here .

关于json - 如何让 Visual Studio 2013 使用自定义 JSON 架构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26169499/

相关文章:

c# - 单击每个项目时停止页面刷新

jsonschema - 具有随机数键的对象的 JSON 模式

java - Dropwizard 错误 405 HTTP 方法 POST Json

PHP JSON 解析器与Javascript JSON 解析器

arrays - 快速发送数组到Web服务参数

c++ - 修复库代码出现编译错误的方法

c++ - Visual Studio 2013 : Redirecting console output to Visual Studio Output Window

json - 重新定义引用的 JSON 架构所需的属性

Json 架构属性别名

json - swift : football-data API doesn't work