Yam and Kson

Yam is a proposal for back matter placed at the end of Markdown documents. It is intended to preserve paragraph level metadata in a way that can round trip between Markdown editors and federated wiki style JSON.

Two demanding features make Yam more than a simple YAML block. It needs to refer to sections of Markdown earlier in the document, and it must be able to embed code either directly or by reference to code blocks above.

Here is a YAML style example for referring to a section.

sections: - id: abc123 ref: "# Introduction"

Here is the same idea written in Kson.

sections: [ { id: abc123 ref: "# Introduction" } ]

Embedding code in YAML requires a block scalar.

snippets: - id: run1 language: ruby code: | puts "Hello from YAM"

In Kson the same snippet is simpler.

snippets: [ { id: run1 language: ruby code: ''' puts "Hello from YAM" ''' } ]

Because Kson is a superset of JSON, Yam written in Kson can be converted without loss to federated wiki JSON. This makes Kson a strong foundation for Yam.

# See - Kson on github - Yam and Kson