aeson-iproute-0.2: Aeson instances for iproute types

Safe HaskellNone
LanguageHaskell2010

Data.Aeson.IP

Contents

Orphan instances

ToJSON IPRange Source # 
ToJSON IP Source # 
ToJSON IPv4 Source #

The ToJSON instance produces JSON strings matching the Show instance.

>>> toJSON (toIPv4 [127,0,0,1])
String "127.0.0.1"
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"
ToJSONKey IPRange Source # 
ToJSONKey IP Source # 
ToJSONKey IPv4 Source # 
ToJSONKey IPv6 Source # 
FromJSON IPRange Source # 
FromJSON IP Source # 
FromJSON IPv4 Source # 
FromJSON IPv6 Source # 
FromJSONKey IPRange Source # 
FromJSONKey IP Source # 
FromJSONKey IPv4 Source # 
FromJSONKey IPv6 Source # 
Show a => ToJSON (AddrRange a) Source # 
Show a => ToJSONKey (AddrRange a) Source # 
(Routable k, Show k, ToJSON k) => ToJSON1 (IPRTable k) Source # 

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 # 
Read (AddrRange a) => FromJSONKey (AddrRange a) Source # 
(FromJSONKey k, Read (AddrRange k), Routable k) => FromJSON1 (IPRTable k) Source # 

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 # 
(FromJSONKey k, Read (AddrRange k), Routable k, FromJSON v) => FromJSON (IPRTable k v) Source #