diff options
author | Joris | 2016-03-26 22:03:57 +0100 |
---|---|---|
committer | Joris | 2016-03-26 22:03:57 +0100 |
commit | a8882071da12cbb5b0bf2f003322e42e181b0c82 (patch) | |
tree | 5a4e654b785d94f7083b72ed6c8b16caee0ec427 /src/server/Model/Message | |
parent | 59c694b0e81deb30ec4e50d5d142b5eda645a27e (diff) |
Use parsing duration facilities from config-manager
Diffstat (limited to 'src/server/Model/Message')
-rw-r--r-- | src/server/Model/Message/Key.hs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/server/Model/Message/Key.hs b/src/server/Model/Message/Key.hs index e9cbf99..6f29f43 100644 --- a/src/server/Model/Message/Key.hs +++ b/src/server/Model/Message/Key.hs @@ -4,9 +4,8 @@ module Model.Message.Key ( Key(..) ) where -import GHC.Generics - -import Data.Aeson +import qualified Data.Aeson as Json +import qualified Data.Text as T data Key = @@ -79,10 +78,7 @@ data Key = | NetworkError | UnexpectedPayload - deriving (Enum, Bounded, Show, Generic) - -instance ToJSON Key + deriving (Enum, Bounded, Show) --- instance ToJSON Coord where --- toJSON (Coord x y) = object ["x" .= x, "y" .= y] --- toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y) +instance Json.ToJSON Key where + toJSON = Json.String . T.pack . show |