extracting json data haskell code example
Example: extracting json data haskell
{-# LANGUAGE DeriveGeneric #-}
import Data.Aeson
import GHC.Generics
data Conversion =
Conversion { to :: !Text
, rate :: Double
, from :: !Text
, v :: Double
} deriving (Show, Generic)
instance FromJSON Conversion
instance ToJSON Conversion