Skip to content

Release 1.0.2

Compare
Choose a tag to compare
@JanHolger JanHolger released this 01 May 19:45
· 46 commits to master since this release
c39bfdb

Added:

  • @DateFormat annotation that adds support for custom date formats per field and support for epoch timestamps in seconds or milliseconds
  • Automatic type coercing between different primitives and between object and array elements
  • Option to enable a strict mode (Mapper.strict()) that prevents the newly introduced type coercing
  • All type coercing methods (.string(), .number(), .bool(), ...) now optionally accept a strict parameter
  • Added toStringList() and toObjectList() helpers in AbstractArray

Fixed:

  • Fields without explicit naming weren't mapped
  • Static fields were included due to a missing check
  • SimpleDateFormat isn't thread safe, which affected date parsing in multit-hreaded environments
  • The new json parser didn't support exponential notation for floating point numbers

Deprecated:

  • AbstractNull.INSTANCE got deprecated, use AbstractNull.VALUE instead

Required Changes:

  • The AbstractNull.INSTANCE constant got deprecated and should be replaced by the new AbstractNull.VALUE constant
  • Check whether your project is fine with the type coercing feature and enable strict mode if not
  • The removal of AbstractMapper is planned for the next release. If not already done, please check all your projects and replace it by the new Mapper class that's easier to use and offers all the new options added in this and the last update.