I am trying to load json using the Aeson library. The thing is that the datastructure that I want to load it into contains more fields than the json.
data Resource = Res {
name :: String,
file :: FilePath,
res :: Picture,
loaded :: Bool
} deriving (Generic, Show)
Where only the name and the file fields are available in the json. Picture is a gloss Picture so that can't really be loaded from json.
I can't figure out how to leave out res and loaded out of the FromJSON instance.