Playground

Try the parser in your browser

The published WebAssembly build, unchanged, running in this tab. Paste a document and see what the library sees.

Playground

Engine loads on first use.

Result

Press "Convert to JSON" to run the parser in this tab.

What you are looking at

The engine on this page is the @sebastienrousseau/noyalib-wasm package from npm, at the release named in the footer. It is the same parser the Rust library, the command line, the editor and the AI agent use. Nothing you paste leaves your browser.

"Convert to JSON" calls parseJson, which strips custom tags and returns plain data, exactly what the official test suite expects. "Back to YAML" calls stringify on the result. Comments and anchors are not part of the data model, so they do not survive the round trip; the lossless editor in the library is the tool for that.

Things to try

  • Paste a document with an anchor and a merge key, and watch the alias resolve.
  • Write 0x2A, 1.23e-4 and no, and see which are numbers and which are strings under YAML 1.2.
  • Leave a key with no value and see it come back as null.
  • Paste something invalid, such as an unclosed flow sequence, and read the error.

Use it in your own page

npm install @sebastienrousseau/noyalib-wasm
import init, { parseJson } from "@sebastienrousseau/noyalib-wasm";
await init();
console.log(parseJson("greeting: hello\n"));

The developer docs cover the rest of the API.