Convert XML ⇄ YAML ⇄ JSON directly inside VS Code.
- Convert between formats with one command
- Pretty format or minify output
- Works from Command Palette and right-click menu
- Automatic input format detection
- Conversion commands:
- XYJson: Convert to JSON - Transform XML or YAML content to JSON
- XYJson: Convert to XML - Transform JSON or YAML content to XML
- XYJson: Convert to YAML - Transform JSON or XML content to YAML
- Available from:
- Command Palette
- Editor right-click context menu
- Automatic input format detection:
- Content starting with
{or[is parsed as JSON - Content starting with
<is parsed as XML - All other content is parsed as YAML
- Content starting with
- Entire document is replaced with the converted output
- Output formatting is configurable (pretty / minified)
- Open an XML, JSON, or YAML file
- Right-click in the editor to open the context menu
- Select one of the conversion commands:
- XYJson: Convert to JSON
- XYJson: Convert to XML
- XYJson: Convert to YAML
The file content will be replaced with the converted result.
| Setting | Type | Default | Description |
|---|---|---|---|
xyjson.minify |
boolean | false |
Whether to minify output instead of pretty formatting. |
xyjson.xmlAttributeNamePrefix |
string | @_ |
Prefix added to XML attribute names when parsing or building XML. |
MIT