summaryrefslogtreecommitdiff
path: root/lib/Tiled2.hs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Tiled2.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Tiled2.hs b/lib/Tiled2.hs
index 8220bfb..79033f0 100644
--- a/lib/Tiled2.hs
+++ b/lib/Tiled2.hs
@@ -398,7 +398,7 @@ data Tiledmap = Tiledmap { tiledmapVersion :: Float
-- ^ Hex-formatted color (#RRGGBB or #AARRGGBB) (optional)
, tiledmapRenderorder :: String
-- ^ Rendering direction (orthogonal maps only)
- , tiledmapProperties :: Map Text Text
+ , tiledmapProperties :: [Property]
-- ^ String key-value pairs
, tiledmapNextobjectid :: Int
-- ^ Auto-increments for each placed object
@@ -416,7 +416,7 @@ instance FromJSON Tiledmap where
<*> o .: "tilesets"
<*> (o .: "backgroundcolor" <|> pure Nothing)
<*> o .: "renderorder"
- <*> (o .: "properties" <|> pure mempty)
+ <*> (o .:? "properties" <&> fromMaybe [])
<*> o .: "nextobjectid"
parseJSON invalid = typeMismatch "Tiledmap" invalid