on master help sign in
Add a deconstruction function for DotNetTime
3b4e0d8Bryan O'Sullivan
Data/Aeson/Types.hs+3−2
@@ -585,8 +585,9 @@ instance FromJSON Value where
585
585
586-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
586-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
587-- serialization format as Microsoft .NET.
587-- serialization format as Microsoft .NET.
588−newtype DotNetTime = DotNetTime UTCTime
588+newtype DotNetTime = DotNetTime {
589+ fromDotNetTime :: UTCTime
589− deriving (Eq, Ord, Read, Show, Typeable, FormatTime)
590+ } deriving (Eq, Ord, Read, Show, Typeable, FormatTime)
590
591
591instance ToJSON DotNetTime where
592instance ToJSON DotNetTime where
592 toJSON (DotNetTime t) =
593 toJSON (DotNetTime t) =