X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=NmcDom.hs;h=731aa1cbb1f72b279377fc95f85bc22809fc6399;hp=11b58dda3bdfd629467a7ba0c824c180b8ccd6ff;hb=749bf63c8755a574c336b7068d6dad47eeecd55e;hpb=3a7ab2462416bb2e358f267630aa1a4e2acfdd5f diff --git a/NmcDom.hs b/NmcDom.hs index 11b58dd..731aa1c 100644 --- a/NmcDom.hs +++ b/NmcDom.hs @@ -26,16 +26,16 @@ data NmcRRService = NmcRRService } deriving (Show, Eq) instance FromJSON NmcRRService where - parseJSON (Array a) = - if length a == 6 then NmcRRService - <$> parseJSON (a ! 0) - <*> parseJSON (a ! 1) - <*> parseJSON (a ! 2) - <*> parseJSON (a ! 3) - <*> parseJSON (a ! 4) - <*> parseJSON (a ! 5) - else empty - parseJSON _ = empty + parseJSON (Array a) = + if length a == 6 then NmcRRService + <$> parseJSON (a ! 0) + <*> parseJSON (a ! 1) + <*> parseJSON (a ! 2) + <*> parseJSON (a ! 3) + <*> parseJSON (a ! 4) + <*> parseJSON (a ! 5) + else empty + parseJSON _ = empty data NmcRRI2p = NmcRRI2p { i2pDestination :: String