diff options
Diffstat (limited to '')
-rw-r--r-- | haskell/src/SpaceTraders/Model/Waypoint.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/haskell/src/SpaceTraders/Model/Waypoint.hs b/haskell/src/SpaceTraders/Model/Waypoint.hs index d18cc11..458df21 100644 --- a/haskell/src/SpaceTraders/Model/Waypoint.hs +++ b/haskell/src/SpaceTraders/Model/Waypoint.hs @@ -22,7 +22,7 @@ instance FromJSON Waypoint where <*> o .: "x" <*> o .: "y" instance ToJSON Waypoint where - toEncoding (Waypoint s t xx yy) = pairs ( "symbol" .= s - <> "type" .= t - <> "x" .= xx - <> "y" .= yy ) + toJSON (Waypoint s t xx yy) = object [ "symbol" .= s + , "type" .= t + , "x" .= xx + , "y" .= yy ] |