schell / aeson-tiled

Aeson instances for Tiled map editor types
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Parse objects correctly #1

Closed isovector closed 6 years ago

isovector commented 6 years ago

The FromJSON instance for Layer used to do this:

(o .: "objects"    <|> pure Nothing)

but this implementation will silently fail if "objects" fails to parse. Which it always did because it incorrectly assumed the types and mandatory-ness of many of its fields.

schell commented 6 years ago

Awesome! Thanks man! Hey, what's hspec-discover?

isovector commented 6 years ago

https://hspec.github.io/hspec-discover.html