## A SOCKS5 rotator config.
service: socks5-rotator
port: 20082
debug: true
upstreams: [
{ host: a.example, weight: 0.7 }
]
## leading zeros stay a string
zip_code: 00544
## '::' forces a literal string
feature_flag:: true
## quoted keys keep dots and spaces
"log.file": /var/log/rotator.log
## multiline — indent auto-trimmed
motd: (
Welcome to the node.
Please behave.
)
| Feature | JSON | YAML | TOML | INI | Ktav |
|---|
✓ present · ~ partial · ✕ absent
$ cargo add ktav
$ npm i @ktav-lang/ktav
$ pip install ktav
$ go get github.com/ktav-lang/golang
$ composer require ktav-lang/ktav
$ implementation("io.github.ktav-lang:ktav:0.8.0")
$ dotnet add package Ktav
JSON is hostile to hand-edit — quotes, commas, no comments. YAML fixes the ergonomics but adds traps: significant indentation and silent type coercion (the infamous no → false “Norway” bug). TOML is solid but splits tables vs inline. Ktav keeps JSON's shape and drops the punctuation tax — without inheriting YAML's surprises.
Types are inferred by strict lexical form: only true/false/null and a strict number grammar are typed — everything else, even 00544, is a string, and :: forces a literal when you need it. No guessing. Plus dotted keys for flat edits, quoted keys for any other key, multi-line strings, and one small spec with one parser.
No — and that's the point. On day one Ktav ships official parsers for 7 languages over a single Rust core, a tree-sitter grammar, an LSP, VS Code / JetBrains plugins, and a language-agnostic conformance suite. Identical behaviour everywhere, verified by tests.
Ktav is a configuration language, not a data-interchange format — don't swap it for JSON in an API. If you need schemas, types and logic inside the config itself, tools like CUE or Dhall go further. Ktav deliberately stays small and readable.