diff options
Diffstat (limited to 'src/Data/Torrent.hs')
-rw-r--r-- | src/Data/Torrent.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs index ce919907..a511d6c1 100644 --- a/src/Data/Torrent.hs +++ b/src/Data/Torrent.hs | |||
@@ -92,6 +92,7 @@ import Text.PrettyPrint.Class | |||
92 | import System.FilePath | 92 | import System.FilePath |
93 | 93 | ||
94 | import Data.Torrent.InfoHash as IH | 94 | import Data.Torrent.InfoHash as IH |
95 | import Data.Torrent.JSON | ||
95 | import Data.Torrent.Layout | 96 | import Data.Torrent.Layout |
96 | import Data.Torrent.Piece | 97 | import Data.Torrent.Piece |
97 | 98 | ||
@@ -123,7 +124,7 @@ data InfoDict = InfoDict | |||
123 | -- BEP 27: <http://www.bittorrent.org/beps/bep_0027.html> | 124 | -- BEP 27: <http://www.bittorrent.org/beps/bep_0027.html> |
124 | } deriving (Show, Read, Eq, Typeable) | 125 | } deriving (Show, Read, Eq, Typeable) |
125 | 126 | ||
126 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''InfoDict) | 127 | $(deriveJSON omitRecordPrefix ''InfoDict) |
127 | 128 | ||
128 | makeLensesFor | 129 | makeLensesFor |
129 | [ ("idInfoHash" , "infohash" ) | 130 | [ ("idInfoHash" , "infohash" ) |
@@ -239,7 +240,7 @@ instance ToJSON NominalDiffTime where | |||
239 | instance FromJSON NominalDiffTime where | 240 | instance FromJSON NominalDiffTime where |
240 | parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v | 241 | parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v |
241 | 242 | ||
242 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''Torrent) | 243 | $(deriveJSON omitRecordPrefix ''Torrent) |
243 | 244 | ||
244 | makeLensesFor | 245 | makeLensesFor |
245 | [ ("tAnnounce" , "announce" ) | 246 | [ ("tAnnounce" , "announce" ) |