reactormonk
05/31/2024, 2:31 PMignoreUnknownKeys
to false
by default? I can't see any reason why anyone would want that in production, it makes protocol upgrades especially painful. Yes, I can change it, but it looks like something you figure out after a downtime. https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-cbor/kotlinx.serialization.cbor/-cbor-builder/ignore-unknown-keys.htmlAdam S
05/31/2024, 2:36 PMreactormonk
05/31/2024, 2:43 PMBen Woodworth
05/31/2024, 5:27 PMignoreUnknownKeys
was added to JSON in the third commit of this PR, replacing strictMode
(which was true by default, disallowing nonstandard JSON) with the ignoreUnknownKeys
option and a couple others. No specific comments/rationale that I can see there eother. But I imagine the CBOR config used JSON as the precedent
It does feel like it comes down to use case though. For me, I can't have information loss when I'm reading data, so passing forward an in-memory class representation that doesn't capture the original data would be problematic in my case working with data. And if the default did ignore keys, I could have the opposite problem, except without ever knowingreactormonk
06/01/2024, 5:25 AM