Closed ysangkok closed 1 year ago
Many people are using custom day formats. This allows for conveniently specifying these formats, also with code gen.
This does of course allow for specifying schemas that don't round trip:
> stack repl --package json-fleece-aeson ghci> :m +TestCases.Types.CustomDateFormat ghci> :m +Fleece.Aeson ghci> :set -XOverloadedStrings ghci> decode customDateFormatSchema "\"12/31/49\"" Right (CustomDateFormat 2049-12-31) ghci> encode customDateFormatSchema (CustomDateFormat (Time.fromGregorian 2049 12 31)) "\"12/31/49\"" ghci> encode customDateFormatSchema (CustomDateFormat (Time.fromGregorian 1949 12 31)) "\"12/31/49\""
Many people are using custom day formats. This allows for conveniently specifying these formats, also with code gen.
This does of course allow for specifying schemas that don't round trip: