instance FromJSON NmcDom where
-- Wherever we expect a domain object, there may be a string
-- containing IPv4 address. Interpret it as such.
-- Question: shall we try to recognize IPv6 addresses too?
parseJSON (String s) =
return $ if isIPv4 s'
instance FromJSON NmcDom where
-- Wherever we expect a domain object, there may be a string
-- containing IPv4 address. Interpret it as such.
-- Question: shall we try to recognize IPv6 addresses too?
parseJSON (String s) =
return $ if isIPv4 s'