help-esb-0.1.6: A Haskell client for the Help.com team's ESB.

Safe HaskellNone
LanguageHaskell98

JSON.Login.Request

Synopsis

Documentation

data Meta Source

Constructors

Meta 

Fields

h_type :: Text
 
h_id :: [Char]
 

data Data Source

Constructors

Data 

Fields

h_name :: Text
 
h_subscriptions :: [Text]
 

Instances

Show Data 
Generic Data 
ToJSON Data 
FromJSON Data 
EsbSend Data

The EsbSend instance for a login request.

type Rep Data 

encode :: ToJSON a => a -> ByteString

Efficiently serialize a JSON value as a lazy ByteString.

decode :: FromJSON a => ByteString -> Maybe a

Efficiently deserialize a JSON value from a lazy ByteString. If this fails due to incomplete or invalid input, Nothing is returned.

The input must consist solely of a JSON document, with no trailing data except for whitespace. This restriction is necessary to ensure that if data is being lazily read from a file handle, the file handle will be closed in a timely fashion once the document has been parsed.

This function parses immediately, but defers conversion. See json for details.

eitherDecode :: FromJSON a => ByteString -> Either String a

Like decode but returns an error message when decoding fails.