aeson-iproute-0.3.0: Aeson instances for iproute types
Safe HaskellNone
LanguageHaskell2010

Data.Aeson.IP

Orphan instances

ToJSON IPRange Source # 
Instance details

ToJSON IP Source # 
Instance details

ToJSON IPv4 Source #

The ToJSON instance produces JSON strings matching the Show instance.

>>> toJSON (toIPv4 [127,0,0,1])
String "127.0.0.1"
Instance details

ToJSON IPv6 Source #

The ToJSON instance produces JSON strings matching the Show instance.

>>> toJSON (toIPv6 [0x2001,0xDB8,0,0,0,0,0,1])
String "2001:db8::1"
Instance details

ToJSONKey IPRange Source # 
Instance details

ToJSONKey IP Source # 
Instance details

ToJSONKey IPv4 Source # 
Instance details

ToJSONKey IPv6 Source # 
Instance details

FromJSON IPRange Source # 
Instance details

FromJSON IP Source # 
Instance details

FromJSON IPv4 Source # 
Instance details

FromJSON IPv6 Source # 
Instance details

FromJSONKey IPRange Source # 
Instance details

FromJSONKey IP Source # 
Instance details

FromJSONKey IPv4 Source # 
Instance details

FromJSONKey IPv6 Source # 
Instance details

Show a => ToJSON (AddrRange a) Source # 
Instance details

Show a => ToJSONKey (AddrRange a) Source # 
Instance details

(Routable k, Show k, ToJSON k) => ToJSON1 (IPRTable k) Source # 
Instance details

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> IPRTable k a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [IPRTable k a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> IPRTable k a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [IPRTable k a] -> Encoding #

Read (AddrRange a) => FromJSON (AddrRange a) Source # 
Instance details

Read (AddrRange a) => FromJSONKey (AddrRange a) Source # 
Instance details

(FromJSONKey k, Read (AddrRange k), Routable k) => FromJSON1 (IPRTable k) Source # 
Instance details

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (IPRTable k a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [IPRTable k a] #

(Routable k, Show k, ToJSON k, ToJSON v) => ToJSON (IPRTable k v) Source # 
Instance details

(FromJSONKey k, Read (AddrRange k), Routable k, FromJSON v) => FromJSON (IPRTable k v) Source # 
Instance details