Add datemidnight and localdate JSON encoders