Jilles van Gurp
09/15/2025, 11:45 AMJson(). I've been using this on my own projects for a few years to work around the defaults that are overly strict and problematic if you care about things like forward compatibility/backward compatibility, and generally being lenient with parsing, which IMHO just boils down to good API design practices. The README spells out in detail what my objections are to these defaults.
Additionally some convenient extension functions that make working JsonElement, JsonObject, etc. a bit easier are included. Should work fine with most recent versions of kotlinx.serialization.
https://github.com/jillesvangurp/kotlinx-serialization-extensionsStefan Oltmann
09/15/2025, 11:50 AMJilles van Gurp
09/15/2025, 11:51 AMJilles van Gurp
09/15/2025, 11:51 AMJilles van Gurp
09/15/2025, 11:52 AMStefan Oltmann
09/15/2025, 11:59 AMJilles van Gurp
09/15/2025, 12:10 PMephemient
09/15/2025, 1:05 PMStefan Oltmann
09/15/2025, 1:19 PM4.1. Fail Fast and Hard
Protocols need to include error reporting mechanisms that ensure
errors are surfaced in a visible and expedient fashion.
That often saved me from said typos.Tgo1014
09/15/2025, 1:27 PMJson versions, one that fails on debug mode and a mode lenient one in production 🤔Stefan Oltmann
09/15/2025, 1:38 PMJson in unit tests & dev build and deploy the lenient one in production build.Stefan Oltmann
09/15/2025, 1:39 PMJson is not a flaw or an error. It's helpful and good.ephemient
09/15/2025, 1:42 PMBernd Prünster
09/15/2025, 1:53 PMephemient
09/15/2025, 1:56 PMBernd Prünster
09/15/2025, 2:14 PMBernd Prünster
09/15/2025, 2:18 PM