From 6bb1fadc5545fb37e1d83509970275fcbc37954c Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 1 Nov 2013 13:49:01 +0400 Subject: Add FromJSON instance for Torrent datatype --- TODO.org | 1 + src/Data/Torrent.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.org b/TODO.org index 24b33d0c..a7ce16fb 100644 --- a/TODO.org +++ b/TODO.org @@ -1,3 +1,4 @@ +* TODO version 0.0.0.0 * TODO torrent linting for indexing * TODO move PeerClient to Data.Torrent.Client * TODO Word64 for Progress fields diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs index 8d62b068..2733956c 100644 --- a/src/Data/Torrent.hs +++ b/src/Data/Torrent.hs @@ -203,7 +203,7 @@ instance ToJSON NominalDiffTime where instance FromJSON NominalDiffTime where parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v -$(deriveToJSON (L.map Char.toLower . L.dropWhile isLower) ''Torrent) +$(deriveJSON (L.map Char.toLower . L.dropWhile isLower) ''Torrent) makeLensesFor [ ("tAnnounce" , "announce" ) -- cgit v1.2.3