The human-first config language.
A hybrid of TOML and JSON designed to be clean, intuitive, and painless to write. No made-up syntax, everything is from other languages you already know.
- Zero Key Quotes: Bare keys for human readability. No
"key": "value"noise - No
[[Table]]Complexity: Objects and lists of objects use clean, intuitive{}syntax you already know! - Explicit
nullSupport: Nativenullvalues... unlike TOML - Explicit Number Types: Support for Ints, Doubles, Floats, and Longs
- Flexible Lists: Native support for empty lists, homogeneous (single-type) lists, and heterogeneous (mixed-type) lists.
- Comments: Simple
//comments like every other sane language uses
Test = "testing testing"
Double = 5.4
Int = 727
Long = 9223372036854775807l
Float = 6.7f
Booleaning = true
EmptyList = []
Homogeneous = ["im", "so", "very", "gay"]
Heterogeneous = [6.7f, { Yeah = "very strong type yep.." }, 727, ["When would you even use this", false], null]
Object = {
Objecting = true
Alpha = {
NullableMuch = null
}
Bravo = {
ObjectInObject = {
Woah = "yes"
}
}
}
| Feature | JSON | TOML | Synx |
|---|---|---|---|
| Bare Keys | ❌ | ✅ | ✅ |
Explicit null | ✅ | ❌ | ✅ |
| Simple Object Nesting | ❌ (Verbose) | ❌ ([[headers]]) | ✅ ({}) |
| Proper Numeric Types | ❌ | ❌ | ✅ |
| Comments | ❌ | ✅ (#) | ✅ (//) |
I got pissed off at TOML for the stupid [[ObjectList]] syntax for lists and for not having null and JSON for having to constantly put quotes everywhere.
Let’s not even mention the other configuration/markup languages... YAML?? XML????????
PS: I only found out hocon exists after I wrote the whole thing lmao