Skip to main content

JSON Editor Component

The JSON Editor component provides a direct interface for editing the underlying JSON schema of a view. It offers syntax highlighting, validation, and auto-completion to help users edit schemas efficiently.

Features

  • Syntax Highlighting: Color-coded JSON for better readability
  • Schema Validation: Real-time validation against the view schema specification
  • Auto-Completion: Suggestions for schema properties and values
  • Error Highlighting: Visual indication of syntax and validation errors
  • Format Controls: Options to format, minify, and copy JSON

Basic Usage

Editor Controls

The JSON Editor includes the following controls:
  • Format: Format the JSON for better readability
  • Validate: Validate the JSON against the schema specification
  • Copy: Copy the JSON to the clipboard
  • Reset: Reset the JSON to the last valid state
  • Apply: Apply changes to the schema

Customization

You can customize the editor appearance and behavior:

Integration with Schema State

The JSON Editor automatically syncs with the schema state:

Advanced Usage

Custom Schema Validation

You can provide custom validation rules:

Schema Templates

You can provide predefined schema templates:

Custom Actions

You can add custom actions to the editor: