guardrail
guardrail copied to clipboard
Circe Encoders and Decoders Duplication
implicit def decodeInstant: Decoder[Instant] = j8time.decodeInstant.or(decodeLong.map(Instant.ofEpochMilli))
We don't actually need to generate these, these come free if we extend TimeInstances
https://github.com/circe/circe/blob/master/modules/java8/src/main/scala/io/circe/java8/time/TimeInstances.scala#L28
Also I can see this being a potential problem for some people since this requires an extra dep from circe. Just a heads up!
Good call! Additionally, I'm realizing the epochMillis conversion should be enabled explicitly instead of assuming the user wants that behavior
Related to #103