Kson is a structured object notation that extends JSON while offering a more human friendly experience. It was created as a modern alternative to both JSON and YAML, aiming to reduce fragility and improve readability.
- ochagavia.nl
- kson.org ![]()
All valid JSON is also valid Kson. At the same time, Kson allows comments, optional quoting, and flexible list and map syntax. Unlike YAML, whitespace is not significant, so indentation mistakes cannot break a file. Here is a simple example.
{ "title": "Flatland", "tags": ["geometry", "fiction"] }
The same data in Kson is more compact.
title: Flatland tags: [geometry, fiction]
Multiline text is handled cleanly with triple quotes.
story: [ { id: abc123 text: ''' In a two-dimensional world lived many shapes. The narrator is a square. ''' } ]
Kson can be rendered in plain, delimited, or compact modes. JSON Schema validation is supported, and error messages are designed to be precise and easy to understand. Reference implementations are available in Python, Rust, Java, Kotlin, and JavaScript. Tooling already exists for editors such as VS Code and IntelliJ.
# See
- Kson on github
- Yam and Kson