WeSearch

KDL – serialization format and a configuration language, like JSON, YAML, or XML

·10 min read · 0 reactions · 0 comments · 0 views

kdl is a document language, mostly based on SDLang, with xml-like semantics that looks like you're invoking a bunch of CLI commands!

Original article
Kdl
Read full at Kdl →
Opening excerpt (first ~120 words) tap to expand

KDL is a small, pleasant document language with XML-like node semantics that looks like you're invoking a bunch of CLI commands! It's meant to be used both as a serialization format and a configuration language, much like JSON, YAML, or XML. It looks like this: package { name my-pkg version "1.2.3" dependencies { // Nodes can have standalone values as well as // key/value pairs. lodash "^3.2.1" optional=#true alias=underscore } scripts { // "Raw" and dedented multi-line strings are supported. message """ hello world """ build #""" echo "foo" node -c "console.log('hello, world!');" echo "foo" > some-file.txt """# } // `\` breaks up a single node across multiple lines. the-matrix 1 2 3 \ 4 5 6 \ 7 8 9 // "Slashdash" comments operate at the node level, // with just `/-`.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Kdl.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Kdl