Skip to content
jc-rs
GitHub

Private YAML to JSON converter

YAML to JSON Converter and Viewer

jc-rs converts ordinary YAML configuration and `---`-separated document streams into the same predictable JSON shape: an array with one entry per document.

yaml--yamlv1.0.0

Universalfile

Try the real parser

Paste input on the left. The same Rust parser that ships in the binary runs locally in this page and writes its JSON on the right.

browser · WebAssembly
Loading the local parser.
inputeditable
jc-rs --yamlJSON
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "enabled": true,
    "replicas": 3,
    "service": "api",
    "tags": [
      "web",
      "internal"
    ]
  }
]

Hover over a JSON value, or focus the JSON pane and use the Left and Right arrow keys, to trace it to the input. Parsing runs inside this tab in WebAssembly. Pasted text and opened files are not uploaded. If site analytics is enabled, it may receive page-level visit data such as the URL, title, and referrer; text in this editor is never included.

Accepted input

One or more non-empty YAML documents as UTF-8 text. Mappings, sequences, scalars, nested values, and --- document separators are accepted. Each document is converted through JSON-compatible values.

What the JSON contains

  • The result is always an array, even when the input contains a single YAML document.
  • A top-level mapping becomes one object; a top-level sequence or scalar is wrapped in an object under value.
  • YAML strings, numbers, booleans, nulls, arrays, and mappings become their JSON counterparts.
  • A multi-document stream produces one array item per document in source order.

What you can do here

  • Convert YAML configuration to JSON
  • Use the YAML viewer to inspect a multi-document stream as JSON
  • See how the YAML parser maps values to JSON types

Use the same parser in a shell

$ cat config.yaml | jc-rs --yaml

The browser tool is for inspection. The CLI form is the useful one in scripts, pipes, containers, and repeatable checks.

Continue with the parsed JSON

Fixture coverage

2/2oracle-valid pairs match under the published structural JSON comparison

Magic syntax

not availableThis parser reads a file or a string rather than a command, so there is nothing for jc-rs to run. Pipe it in.

Source: crates/jc-rs-parsers/src/format/yaml.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare