module Data.Tiled.TH where import Universum import qualified Data.Aeson.TH as TH import Data.Char (toLower) aesonOptions :: Int -> TH.Options aesonOptions l = TH.defaultOptions { TH.omitNothingFields = True , TH.rejectUnknownFields = True -- can't be bothered to do a nicer prefix strip , TH.fieldLabelModifier = drop l . map toLower , TH.sumEncoding = TH.UntaggedValue }