
15 Sep
2015
15 Sep
'15
12:42 p.m.
Dear Haskell cafe, I want to convert form mtime :: System.Posix.Types.EpochTime to something aeson can eat without having to define an instance. I choose Integer. My current solution[1] is just using (read . show). I know, ugly, but the only thing I could get going. What is the proper way to convert System.Posix.Types.EpochTime to Integer or something else aeson will automatically convert without making a ToJSON instance? As a beginner I wonder: is there a general way to go about finding conversion paths between types? Greetings, Bram Neijt [1] https://github.com/bneijt/httpmtimeline/blob/master/src/Main.hs#L21