json parsing in haskell
I'm trying to parse JSON data in haskell. Having gone through a slew of websites, this is the furthest I have been able to get to. data Address = Address { house :: Integer, street :: String, city :: String, state :: String, zip :: Integer } deriving (Show) data Person = Person { name :: String, age :: Integer, address :: Address } deriving (Show) getName :: Person -> String getName (Person n _ _) = n getAddress :: Person -> Address getAddress (Person _ _ a) = a getState :: Address -> String getState (Address _ _ _ s _) = s I write that in a file ex.hs and load it in ghci --> Prelude> import