Skip to content

DuperThe format that's super!

A human-friendly extension of JSON with quality-of-life improvements, extra types, and semantic identifiers.

Duper

Why Duper? ​

Duper excels in a variety of use cases:

  • Configuration files: Duper's explicit types and identifiers serve as helpful guides when users need to modify values.
  • REST APIs: Self-documenting identifiers make Duper feel natural in API payloads and responses.
  • Data interchange: With support for bytes, raw data, minimal syntax, and JSON compatibility, Duper is ideal for data exchange between systems.

Full example ​

duper
UserProfile({
  id: Uuid("f111c275-b4ce-4392-8e5b-19067ce39b53"),
  username: "EpicEric",
  email: EmailAddress("eric@duper.dev.br"),
  settings: {
    "dark mode": true,
    language: LanguageAlpha2("en"),
  },
  avatar: Png(b"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR"),
  bio: r#"Hello! I'm a super "duper" user!"#,
  last_logins: [
    (IPv4Address("192.168.1.100"), DateTime("2024-03-20T14:30:00Z")),
  ],
})

Comparison ​

FeatureJSONJSON5TOMLYAMLDuper
CommentsβŒβœ…βœ…βœ…βœ…
Trailing commasβŒβœ…βœ…βœ…βœ…
Unquoted keysβŒβœ…βœ…βœ…βœ…
Unambiguousβœ…βœ…βš οΈβŒβœ…
IdentifiersβŒβŒβŒβŒβœ…
Tuples and bytesβŒβŒβŒβŒβœ…
Raw stringsβŒβŒβœ…βš οΈβœ…
Simplicityβœ…βœ…βœ…βŒβš οΈ
Popularityβœ…βŒβœ…βœ…βŒ

Released under the MIT License.