jsoniter-scala v2.5.0 Release Notes

Release Date: 2020-07-10 // almost 2 years ago
  • ๐Ÿš€ SECURITY RELEASE

    • More efficient serialization of Int and java.time.Period values with Scala.js
    • ๐Ÿ›  Fix #562 by adding a configuration option to require the discriminator for ADTs to be the first field of JSON objects

    ๐Ÿ”ง This breaking change for the default derivation configuration was introduced to avoid CPU overuse in case of parsing of ADTs with discriminator (or type hint) set to the end of JSON objects (especially nested ones).

    ๐Ÿ“œ It can affect the parsing of messages which are serialized by circe or other JSON serializers that put discriminators in the middle or to the end of JSON objects.

    ๐Ÿ”ง Use the withRequireDiscriminatorFirst(false) configuration option to restore parsing of discriminators without restrictions if impact can be neglected in your case.

    ๐Ÿ”’ A lot of thanks to @fommil who found this case and helped to recognize a security issue.

    All changes v2.4.4...v2.5.0