Skip to main content

JSON Schema for Master Packager Dev

By referencing the JSON schema, code editors provide real-time validation, structure enforcement, and context-aware documentation. This eliminates the need to constantly switch between the editor and documentation to verify property names or value types.

For general information about the $schema property and cross-property references, see JSON Project Structure.

Schema Location​

URL: https://www.masterpackager.com/support-master-packager-dev/mpdev-schema.json

Key Benefits​

  • IntelliSense & Auto-complete: The editor suggests available properties and values as you type.
  • Real-time Validation: Configuration errors, typos, and incorrect value types are flagged immediately.
  • In-Editor Documentation: Hovering over a property displays its description and usage rules directly in the interface.

Configuration​

Visual Studio Code​

Add the $schema property to the top of your JSON file:

{
"$schema": "https://www.masterpackager.com/support-master-packager-dev/mpdev-schema.json"
}

VS Code picks it up automatically:

Picture of Visual Studio Code showing JSON file with $schema property usage.

Visual Studio​

Visual Studio supports schema validation for open JSON files by entering the Schema URL in the textbox at the top of the editor labelled Schema: < No Schema Selected >:

Picture of Visual Studio showing to add JSON Schema at top of the JSON file in Schema textbox.

AI Assistance​

When generating configuration files using AI tools, providing the schema allows the model to generate syntactically correct and up-to-date code.

Usage: Include the schema URL in your prompt to strictly define the output structure.

Example Prompt:

Write a Master Packager Dev configuration file. Use the rules defined in this schema: https://www.masterpackager.com/support-master-packager-dev/mpdev-schema.json. The package should install to ProgramFiles and create a shortcut in ProgramMenu folder.