Confetti: The Configuration Language For Humans
Posted on March 14th, 2025 #programming
Today, I’m announcing Confetti - a modern configuration language format intended for human editable configuration files. Checkout its official webpage for examples.
Why?#
Formats like XML and JSON are data-interchange formats. They are not great as configuration file formats as the signal to noise ratio is too high. A missing comma or missing colon can throw everything off. JSON, in particular, doesn’t even allow comments!
The biggest downside of these formats is they aren’t localization friendly.
Formats, like JSON, require the English words null
, true
, and false
, and Western digits 0
through 9
.
Confetti is different.
Confetti lets you write configuration files in your native language.
It’s typeless and doesn’t make assumptions.
For example, you can decide whether true
, yes
, or on
makes the most sense for your application.
Minimalistic Design#
Confetti syntax is loosely inspired by Unix configuration files, the shell word splitting algorithm, and JSON. I wanted the format to remain typeless and support hierarchical structures.
I designed Confetti to be extensible. Just like how John Grubber defined Common Markdown and others have created their own Markdown flavors, I encourage others to create their own Confetti flavors.
Reference Implementation#
I’ve written an implementation of a Confetti parser in C and its source code is hosted on GitHub. This implementation parses Confetti source incrementally. It does not build an in-memory tree-representation like most XML and JSON parsers.
Closing Thoughts#
I have zero expectations for Confetti. Existing formats, even with their faults, are entrenched in the software ecosystem. Nonetheless, I created Confetti because I believe it addresses real problems and I hope others will see that too.