com-lihaoyi / upickle

uPickle: a simple, fast, dependency-free JSON & Binary (MessagePack) serialization library for Scala
https://com-lihaoyi.github.io/upickle
MIT License
721 stars 165 forks source link

Add `override def ignoreUnknownKeys`/`@ignoreUnknownKeys(b: Boolean)` to allow treatment of unknown keys to be configurable #548

Closed lihaoyi closed 10 months ago

lihaoyi commented 10 months ago

Previously, they were always ignored. Now you can opt-in to turn them into an error on a per-case-class basis via an annotation, or globally via an override (which you can then disable on a per-case-class basis using the same annotation)

Fixes https://github.com/com-lihaoyi/upickle/issues/537