Decodering: Giving JSON enums
Details
JSON’s deepest flaw is that its “objects” are type-ambiguous. In this Decodering talk, one of our organisers shows his recent attempt to fix that by grafting on what many consider the most appealing part of Rust’s type system: enums, also known as algebraic data types.
The type declarations work like a JSON Schema, but with generic types and a much simpler syntax. Instead of a page of schema boilerplate, you write:
enum Event = Event{title: String, date: String, time: String, location: String};
And a value looks like JSON with an explicit constructor and fewer quotes:
Event{ title: “Decodering”, date: “2026-10-27”, time: “18:30”, location: “Discord” }
The talk covers a demo of the implementation so far, the challenges along the way and where it’s heading next. It runs for about 45 minutes.
Decodering is our fortnightly Discord-hosted series about what we’ve been learning. The talks are informal and this is not a lecture, so please interrupt whenever you like, ask questions and make observations as we go.
