简体   繁体   English

如何将我自己的错误消息和智能感知添加到visual-studio-code 中的JSON 文件中

[英]how can I add my own error messagess and intellisense to a JSON file in visual-studio-code

I'm building a tool that validates that a JSON file conforms to my custom requirements.我正在构建一个工具来验证 JSON 文件是否符合我的自定义要求。

I can let the tool spit out the error messages in the terminal, but I'd rather see these errors be marked in the JSON document itself.我可以让该工具在终端中吐出错误消息,但我宁愿看到这些错误被标记在 JSON 文档本身中。

And if possible, I would also like to add code completion for string values in that document.如果可能,我还想为该文档中的字符串值添加代码完成。

I have tried to google it, and this link seems promising: programmatic-language-features .我试图用谷歌搜索它,这个链接似乎很有希望: programmatic-language-features Can you confirm this is the right way forward, or tell me which approach might be more suitable您能否确认这是正确的前进方式,或者告诉我哪种方法可能更合适

To answer my own question: yes: the 'programmatic language features' is one of the 2 ways to do it.回答我自己的问题:是的:“编程语言功能”是两种方法之一。 The other being: 'language-server-extension' In my case, I realized that my best option is most likely forking the JSON-lanugage-server and make the necessary changes另一个是:'language-server-extension' 就我而言,我意识到我最好的选择很可能是分叉JSON-lanugage-server并进行必要的更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用WebMatrix和Visual Studio调试代码? - How can I debug my code using WebMatrix and Visual Studio? Visual Studio Code JSON对象在新功能中丢失了智能感知 - Visual Studio Code JSON object losing intellisense in new function JSON Visual Studio Code 中的文件错误:应为逗号 json(514) - JSON file error in Visual Studio Code: Expected comma json(514) Visual Studio Code 中的 JSON 文件错误:预期的逗号 json(514) - JSON file error in Visual Studio Code:Expected comma json(514) 如何获知intellisense以了解JSON参数的结构(visual studio 2012) - How do I get intellisense to know the structure of a JSON parameter (visual studio 2012) 如何让JSON Schema在Visual Studio 2015中工作(Intellisense和验证) - How to get JSON Schema to work in Visual Studio 2015 (Intellisense and validation) 如何让Visual Studio获取高亮.json源代码? - How can I get Visual Studio to source highlight .json source code? 如何使用我自己的格式将 JSON 对象转换为 javascript 文件 - How can I convert a JSON object into javascript file with my own format 如何在 Visual Studio Code 中控制 JSON 的格式样式? - How do I control the formatting style of JSON in Visual Studio Code? Visual Studio 2015添加JSON-File - Visual Studio 2015 add JSON-File
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM