RevealTheme logo

YAML-naar-JSON-conversie

Converteer YAML naar JSON in uw browser. Ondersteunt geneste mappings, lijsten, tekenreeksen, getallen en booleans.

Hoe u deze tool gebruikt

  1. 1

    Paste or type your YAML into the input box, using spaces (not tabs) for indentation.

  2. 2

    Read the pretty-printed JSON that appears below the box as you type.

  3. 3

    If a red error message shows instead, check your indentation and remove unsupported syntax.

  4. 4

    Select and copy the JSON output to paste into your config, code, or API client.

Wat is de YAML-naar-JSON-conversie?

YAML en JSON zijn gegevensuitwisselingsformaten die dezelfde structuren kunnen weergeven. YAML is leesbaarder voor mensen (zonder accolades of aanhalingstekens), maar JSON is universeler te parseren. Conversie tussen beide is gebruikelijk voor configuratiebestanden (GitHub Actions, Docker Compose) wanneer u gegevens moet aanleveren aan tools die alleen JSON accepteren.

Veelvoorkomende toepassingen

  • Quickly turning a small docker-compose.yml or GitHub Actions snippet into JSON to inspect its structure.

  • Converting a hand-written config block into JSON to paste into a tool or API that only accepts JSON.

  • Checking how YAML scalars like true, 123, or ~ get typed once they become JSON values.

  • Sanity-checking indentation in a YAML fragment by seeing whether the nesting comes out as you expect.

  • Generating seed JSON fixtures for tests from a more readable YAML draft.

  • Teaching or learning the mapping between YAML structures and their JSON equivalents.

Veelgestelde vragen

Worden de geavanceerde functies van YAML ondersteund?
Ankers, aliassen, tekenreeksen over meerdere regels en tags worden niet ondersteund. Gebruik voor die gevallen een volledige YAML-parser zoals js-yaml.

Gerelateerde tools