markDOWN Object Notation
Downson is now open source! Read the announcement!
Downson makes it possible to embed typed and structured data into Markdown documents.
Specification
Read the specification here: SPECIFICATION.md.
- The classic "Hello, World!" example:
- downson
My favorite **.greeting** [](right) is "[Hello, world!](string)".
- JSON
{ "greeting": "Hello, World!" }
- downson
- Configuring available and default languages:
- downson
The available **.languages** [](right) are the following: 1. [Hungarian](string "hun"), 1. [English](string "eng"), 1. [German](string "ger"). The **.default language** [](right "default") is set to [Hungarian](string "hun").
- JSON
{ "languages": [ "hun", "eng", "ger" ], "default": "hun" }
- downson
- Describing your PC to your friend:
- downson
- Let me show you this **.bad boy** [](right:object "configuration")! It has [8](int) **.cores** [](left) and [16](int) gigs of **.memory** [](left)! []($) **.Impressive** [](right "isImpressive"), huh? - [Of course](boolean, "true"), bro!
- JSON
{ "configuration": { "cores": 8, "memory": 16 }, "isImpressive": true }
- downson
- Type parameters and custom types:
- downson
My **.favorite color** [](right "favorite") is [aquamarine](rgb:mode=string), but I also **.like** [](right) [#FFFFFF](rgb:mode=hex).
- JSON
{ "favorite": { "r": 127, "g": 255, "b": 212 }, "like": { "r": 255, "g": 255, "b": 255 } }
- downson
Larger examples can be found in the examples directory.
- Downson aims to be easily read by humans and easily written by humans.
- Downson is NOT a data exchange format. It is best suited for configuration and other read-only data files.
This repository contains a test suite that can be used to exercise downson implementations. The description of the test cases can be found in the TESTS.md downson file.
Project | Description | Language |
---|---|---|
downson-js | A downson parser library based on marked. | JavaScript |
downson-js-cli | A command-line downson-to-JSON converter. | JavaScript |
Check out CONTRIBUTING.md for infos about contributing!
Thanks to all the awesome people (Robi, Bence, Dávid, Ádám, Marin, Zsolt, Lajos, Nándi, Tibor, Péter), who took the time to review the early drafts of this specification!
The contents of this repository are licensed under the MIT License – see LICENSE.