1 {-# LANGUAGE OverloadedStrings #-}
3 module NmcRpc ( NmcRes(..)
6 import Data.ByteString.Lazy (ByteString)
7 import Data.Text as T (unpack)
10 import Data.Map as M (Map, lookup)
11 import Control.Applicative ((<$>), (<*>), empty)
14 data NmcRes = NmcRes { resName :: String
15 , resValue :: ByteString -- string with NmcDom
17 , resAddress :: String
18 , resExpires_in :: Int
20 instance FromJSON NmcRes where
21 parseJSON (Object o) = NmcRes