JSON Schema

Quick tip for those of you manually completing complex nested (or just plain large) JSON files, you can make the whole process a lot easier by providing completions, rich descriptions and tooltips with schema templates. Modern editors like Visual Studio (or VS Code) supports JSON Schema so by referencing a template you can quickly author complex configuration files. To get completion support in your editor, simply add the $schema property to the root JSON object as shown below:

{
  "$schema": "https://aka.ms/dotnet-monitor-schema"
}

Your template file can include required fields or define if a field is a string or an int. Here is a site where you can learn more about developing JSON templates.

Showing metrics being fillled out with completions and tooltips


Comment Section

Comments are closed.