X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=NmcDom.hs;h=3ab8c7fd40aa6213e8e47f63459a9fac296edeb1;hp=477def1b8b2418a7202b429d9cc864096fea9bd6;hb=0c0ad44ac6376d9bfb2b84d5f2293d945130ab45;hpb=f8b49bb27eed8d2d62e95e1f0e97acd4efe48bf7 diff --git a/NmcDom.hs b/NmcDom.hs index 477def1..3ab8c7f 100644 --- a/NmcDom.hs +++ b/NmcDom.hs @@ -81,16 +81,16 @@ instance Mergeable NmcRRService where merge _ b = b data NmcRRI2p = NmcRRI2p - { i2pDestination :: String - , i2pName :: String - , i2pB32 :: String + { i2pDestination :: Maybe String + , i2pName :: Maybe String + , i2pB32 :: Maybe String } deriving (Show, Eq) instance FromJSON NmcRRI2p where parseJSON (Object o) = NmcRRI2p - <$> o .: "destination" - <*> o .: "name" - <*> o .: "b32" + <$> o .:? "destination" + <*> o .:? "name" + <*> o .:? "b32" parseJSON _ = empty instance Mergeable NmcRRI2p where