]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - NmcDom.hs
fix and relax cabal
[pdns-pipe-nmc.git] / NmcDom.hs
index 8153a1dd7dad2d0b3128b455cf465bf0a93aa381..3ab8c7fd40aa6213e8e47f63459a9fac296edeb1 100644 (file)
--- a/NmcDom.hs
+++ b/NmcDom.hs
@@ -4,6 +4,7 @@ module NmcDom   ( NmcDom(..)
                 , NmcRRService(..)
                 , NmcRRI2p(..)
                 , NmcRRTls(..)
+                , NmcRRDs(..)
                 , emptyNmcDom
                 , mergeNmcDom
                 ) where
@@ -80,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