Json validator in visual studio 2019

sravan kumar 121 Reputation points
2020-10-19T13:12:41.713+00:00

Hi,

Im just wondering if there is any option in visual studio 2019 to validate the json files in the .Net solution or if there is any extension that it can perform the same.

Thanks,
Sravan kumar

Developer technologies Visual Studio Other
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 122.5K Reputation points
    2020-10-19T18:41:44.447+00:00

    If you open the JSON file, then general errors will be underlined.

    You can also define a schema file and drag it to your JSON file, or enter the “$schema” property manually. Then Visual Studio will validate the file according to associated schema — see: https://visualstudiomagazine.com/articles/2018/01/24/json-messages-schema.aspx, for example.

    What kind of validation do you need?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.