Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>json-in-yamlNew to Visual Studio Code? Get it now.
json-in-yaml

json-in-yaml

bcd6

|
56 installs
| (0) | Free
Format json in yaml.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

YAML JSON Formatter

This VSCode extension enhances YAML file formatting by:

  • Inheriting the default YAML formatter rules.
  • Automatically formatting YAML values that are valid JSON strings.

Features

  • Formats YAML using VSCode's default YAML formatter.
  • Detects and reformats JSON strings in YAML to a pretty-printed JSON format.

Usage

  1. Open a YAML file.
  2. Use the Format Document command (Shift+Alt+F or right-click and select "Format Document").
  3. JSON strings within the YAML will be reformatted automatically.

Example

Before formatting:

key: { "name": "John", "age": 30, "city": "New York" }

After formatting:

key:
  {
    "name": "John",
    "age": 30,
    "city": "New York"
  }
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft