metosin / jsonista

Clojure library for fast JSON encoding and decoding.
https://cljdoc.org/d/metosin/jsonista
Eclipse Public License 2.0
422 stars 30 forks source link

Support data-driven custom formats for JavaTime classes #29

Open whenceforth opened 4 years ago

whenceforth commented 4 years ago

When setting up the JavaTime serializers and deserializers, it would be nice to provide support for the :date-format option.

https://github.com/metosin/jsonista/blob/eff47f29614902767e46007f76a3b2c4aca23034/src/clj/jsonista/core.clj#L130-L131

   ;; clojure-module gets to process options. Great!
    (.registerModule (clojure-module options))
   ;; Because the code uses Jackson's JavaTimeModule, users can't control formats
     (.registerModule (JavaTimeModule.))