;      !"#$%&'()*+,-./0123456789: portable experimental%Bryan O'Sullivan <bos@serpentine.com>NoneA key/value pair for an  . -A JSON value represented as a Haskell value. A JSON "array" (sequence). A JSON "object" (key/ value map). "A continuation-based parser type. ;Success continuation. <Failure continuation. The result of running a  . The empty array. =Determines if the  is an empty .  Note that:  isEmptyArray . The empty object. Run a  . Run a   with a > result type. Run a   with an ? result type.  Create a  from a list of name/value s. If duplicate ; keys arise, earlier keys and their associated values win. * @A;< B=CDEFGHIJKLMNOPQR =  @A;<  B=CDEFGHIJKLMNOPQRportable experimental%Bryan O'Sullivan <bos@serpentine.com>NoneS Transform a T into a U while transforming the keys. V Transform a T into a U while transforming the keys. W#Transform the keys and values of a U. XTransform the keys of a U. SVWXYZ[SVWXYZ[SVWXYZ[ portable experimental%Bryan O'Sullivan <bos@serpentine.com>NoneA newtype wrapper for \! that uses the same non-standard / serialization format as Microsoft .NET, whose System.DateTime D type is by default serialized to JSON as in the following example:   /Date(1302547608878)/ 9The number represents milliseconds since the Unix epoch. @A type that can be converted from JSON, with the possibility of  failure. When writing an instance, use ], mzero, or ^ to make a  conversion fail, e.g. if an   is missing a required key, or ! the value is of the wrong type. An example type and instance:  {-# LANGUAGE OverloadedStrings #-}  (data Coord { x :: Double, y :: Double }  instance FromJSON Coord where  parseJSON (  v) = Coord _  v " "x" `  v " "y"  -- A non- $ value is of the wrong type, so use mzero to fail.  parseJSON _ = mzero Note the use of the OverloadedStrings" language extension which enables  a* values to be written as string literals. !Instead of manually writing your # instance, there are three options  to do it automatically:   Data.Aeson.TH: provides template-haskell functions which will derive an M instance at compile-time. The generated instance is optimized for your type D so will probably be more efficient than the following two options:  Data.Aeson.Generic provides a generic fromJSON function that parses to " any type which is an instance of Data. & If your compiler has support for the  DeriveGeneric and  DefaultSignatures language extensions,  parseJSON will have a default  generic implementation. To use this, simply add a  deriving b clause to your datatype and  declare a FromJSON8 instance for your datatype without giving a definition  for  parseJSON. <For example the previous example can be simplified to just: {-# LANGUAGE DeriveGeneric #-}  import GHC.Generics  9data Coord { x :: Double, y :: Double } deriving Generic  instance FromJSON Coord &A type that can be converted to JSON. An example type and instance:  {-# LANGUAGE OverloadedStrings #-}  (data Coord { x :: Double, y :: Double }  instance ToJSON Coord where  toJSON (Coord x y) =  ["x"   x, "y"   y] Note the use of the OverloadedStrings" language extension which enables  a* values to be written as string literals. !Instead of manually writing your # instance, there are three options  to do it automatically:   Data.Aeson.TH: provides template-haskell functions which will derive an M instance at compile-time. The generated instance is optimized for your type D so will probably be more efficient than the following two options:  Data.Aeson.Generic provides a generic toJSON function that accepts any  type which is an instance of Data. & If your compiler has support for the  DeriveGeneric and  DefaultSignatures* language extensions (GHC 7.2 and newer),  toJSON- will have a default generic implementation. 'To use the latter option, simply add a  deriving b clause to your  datatype and declare a ToJSON- instance for your datatype without giving a  definition for toJSON. <For example the previous example can be simplified to just: {-# LANGUAGE DeriveGeneric #-}  import GHC.Generics  9data Coord { x :: Double, y :: Double } deriving Generic  instance ToJSON Coord withObject expected f value applies f to the   when value is an Object  and fails using % expected otherwise. withObject expected f value applies f to the a when value is a String  and fails using % expected otherwise. withObject expected f value applies f to the  when value is an Array  and fails using % expected otherwise. withObject expected f value applies f to the c when value is a Number  and fails using % expected otherwise. withObject expected f value applies f to the d when value is a Bool  and fails using % expected otherwise.  Construct a  from a key and a value. !>Convert a value from JSON, failing if the types do not match. "7Retrieve the value associated with the given key of an  .  The result is ]/ if the key is not present or the value cannot # be converted to the desired type. 2This accessor is appropriate if the key and value must be present < in an object for it to be valid. If the key and value are  optional, use '(.:?)' instead. #7Retrieve the value associated with the given key of an  .  The result is e if the key is not present, or ] if 4 the value cannot be converted to the desired type. @This accessor is most useful if the key and value can be absent @ from an object without affecting its validity. If the key and  value are mandatory, use '(.:)' instead. $#Helper for use in combination with # to provide default ) values for optional JSON object fields. BThis combinator is most useful if the key and value can be absent E from an object without affecting its validity and we know a default D value to assign in that case. If the key and value are mandatory,  use '(.:)' instead. Example usage:  v1 <- o # "opt_field_with_dfl" .!= " default_val"  v2 <- o " "mandatory_field"  v3 <- o # " opt_field2" %AFail parsing due to a type mismatch, with a descriptive message. fghijklmn !"#$%.The name of the type you are trying to parse. The actual value encountered. opqrstuvwxyz{|}~fghi !"#$%fghijklmn !"#$%opqrstuvwxyz{|}~ portable experimental%Bryan O'Sullivan <bos@serpentine.com>NoneE      !6      !portable experimental%Bryan O'Sullivan <bos@serpentine.com>None&  !"#$%& % ! "#$ portable experimental%Bryan O'Sullivan <bos@serpentine.com>None&@Parse a top-level JSON value. This must be either an object or  an array, per RFC 4627. @The conversion of a parsed value to a Haskell value is deferred E until the Haskell value is needed. This may improve performance if B only a subset of the results of conversions are needed, but at a  cost in thunk allocation. '@Parse a top-level JSON value. This must be either an object or  an array, per RFC 4627. This is a strict version of &! which avoids building up thunks B during parsing; it performs all conversions immediately. Prefer = this version if most of the JSON data needs to be accessed. (*Parse any JSON value. You should usually & in preference to = this function, as this function relaxes the object-or-array  requirement of RFC 4627. CIn particular, be careful in using this function if you think your / code might interoperate with Javascript. A nave Javascript % library that parses JSON data using eval is vulnerable to attack A unless the encoded data represents an object or an array. JSON E implementations in other languages conform to that same restriction , to preserve interoperability and security. )Strict version of ( . See also '. *Parse a quoted JSON string. "(Parse a string without a leading quote. &'#$%&'()()*+*",-./&'()*./&'#$%&'()()*+*",-./portable experimental%Bryan O'Sullivan <bos@serpentine.com>None&'()*&(*')portable experimental%Bryan O'Sullivan <bos@serpentine.com>None+Encode a JSON value to a 0. You can convert this to a  string using e.g. 1#, or encode straight to UTF-8 (the  standard JSON encoding) using ,. ,-Efficiently serialize a JSON value as a lazy 2. +34,5+,+,+34,5portable experimental%Bryan O'Sullivan <bos@serpentine.com>None6!The type constructor for readers 7!The type constructor for queries --Efficiently serialize a JSON value as a lazy 2. .1Efficiently deserialize a JSON value from a lazy 2. 3 If this fails due to incomplete or invalid input, e is  returned. >This function parses immediately, but defers conversion. See  & for details. /1Efficiently deserialize a JSON value from a lazy 2. 3 If this fails due to incomplete or invalid input, e is  returned. ?This function parses and performs conversion immediately. See  ' for details. 8Flexible type extension 90Type extension of queries for type constructors :0Type extension of readers for type constructors 6;<7=>?@-./0A1BCDE89:-./01./-106;<7=>?@-./0A1BCDE89:portable experimental%Bryan O'Sullivan <bos@serpentine.com>None21Efficiently deserialize a JSON value from a lazy 2. 3 If this fails due to incomplete or invalid input, e is  returned. >This function parses immediately, but defers conversion. See  & for details. 31Efficiently deserialize a JSON value from a lazy 2. 3 If this fails due to incomplete or invalid input, e is  returned. ?This function parses and performs conversion immediately. See  ' for details. 4Like 23 but returns an error message when decoding fails. 5Like 33 but returns an error message when decoding fails. 2345%  !"#$&',2345%2345,  ! "#$&'2345portable experimentalNone6Generates both  and % instance declarations for the given  data type. DThis is a convienience function which is equivalent to calling both  7 and 9. 7 Generates a / instance declaration for the given data type.  Example:    data Foo = Foo Char Int  $(7 F ''Foo) (This will splice in the following code:   instance  Foo where   =  \value -> case value of ' Foo arg1 arg2 ->  $ G $ do  mv <- H 2  I mv 0 ( arg1)  I mv 1 ( arg2) " return mv 8IGenerates a lambda expression which encodes the given data type as JSON.  Example:    data Foo = Foo Int    encodeFoo :: Foo ->   encodeFoo = $(8 id ''Foo) (This will splice in the following code:   \#value -> case value of Foo arg1 ->  arg1 JHelper function used by both 7 and 8. Generates code M to generate the JSON encoding of a number of constructors. All constructors  must be from the same type. KFGenerates code to generate the JSON encoding of a single constructor. 9 Generates a / instance declaration for the given data type.  Example:    data Foo = Foo Char Int  $(9 id ''Foo) (This will splice in the following code:   instance  Foo where   =  \value -> case value of   arr -> . if (V.length arr == 2)  then Foo <$>  (arr L 0)  <*>  (arr L 1) ! else fail "< error message>" # other -> fail "< error message>" :JGenerates a lambda expression which parses the JSON encoding of the given  data type.  Example:    data Foo = Foo Int    parseFoo ::  ->   Foo  parseFoo = $(: id ''Foo) (This will splice in the following code:   \"value -> case value of arg -> Foo <$>  arg MHelper function used by both 9 and : . Generates O code to parse the JSON encoding of a number of constructors. All constructors  must be from the same type. NCGenerates code to parse the JSON encoding of a single constructor. O6Generates code to parse the JSON encoding of an n-ary  constructor. P#Boilerplate for top level splices.  The given Q3 must be from a type constructor. Furthermore, the E type constructor must be either a data type or a newtype. Any other $ value will result in an exception. R&Extracts the name from a constructor. S/Extracts the name from a type variable binder. T4Makes a string literal expression from a constructor's name. U>Creates a string literal expression from a record field name. VThe name of the outermost  constructor. 6 Function to change field names. 'Name of the type for which to generate  and   instances. 7 Function to change field names. )Name of the type for which to generate a  instance  declaration. 8 Function to change field names. Name of the type to encode. J Function to change field names. 9Constructors for which to generate JSON generating code. K9 Function to change field names. )Name of the type for which to generate a  instance  declaration. : Function to change field names. Name of the encoded type. M3Name of the type to which the constructors belong.  Function to change field names. 6Constructors for which to generate JSON parsing code. N3Name of the type to which the constructor belongs.  Function to change field names. 5Constructor for which to generate JSON parsing code. O3Name of the type to which the constructor belongs. Wstructor name. Wstructor arity. XYZ[\]^_P9Function that generates the actual code. Will be applied 9 to the type variable binders and constructors extracted  from the given Q. Resulting value in the ` uasi monad. RSTU#Function to change the field name. V6789:6798:678JK9:MNOXYZ[\]^_PRSTUVa       ! " # $ % & ' ( ) * + , - . / 0 1 2 345567#*6789:;<=>?@ABCADEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc6defAghAijAklAgmnopAqrstuvABw x y z { | } ~                                               ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?n@An@BCDEFGHIJKLMINJOPQR!STUAiVWXYWZ[WZ\ ]WX^_`abcdefghijcdklmnopqrscdJt aeson-0.6.1.0Data.Aeson.TypesData.Aeson.ParserData.Aeson.EncodeData.Aeson.Generic Data.Aeson Data.Aeson.THData.Aeson.Types.InternalData.Aeson.FunctionsData.Aeson.Types.ClassData.Aeson.Types.GenericData.Aeson.Parser.InternalPairValueNullBoolNumberStringArrayObjectParserResultSuccessError emptyArray emptyObjectparse parseMaybe parseEitherobject DotNetTimefromDotNetTimeFromJSON parseJSONToJSONtoJSON withObjectwithText withArray withNumberwithBool.=fromJSON.:.:?.!= typeMismatchjsonjson'valuevalue'jstring fromValueencodedecodedecode' eitherDecode eitherDecode' deriveJSON deriveToJSONmkToJSONderiveFromJSON mkParseJSONFailure isEmptyArraybase Data.MaybeMaybe Data.EitherEither runParserapP$fHashableValue$fIsStringValue $fNFDataValue$fMonoidParser$fMonadPlusParser$fAlternativeParser$fApplicativeParser$fFunctorParser $fMonadParser$fMonoidResult$fAlternativeResult$fMonadPlusResult$fApplicativeResult $fMonadResult$fFunctorResult$fNFDataResult mapHashKeyValcontainers-0.5.0.0 Data.Map.BaseMapunordered-containers-0.2.3.3Data.HashMap.BaseHashMap hashMapKey mapKeyValmapKeystrictlazy time-1.4.0.1Data.Time.Clock.UTCUTCTimeControl.ApplicativeemptyGHC.Basefail Data.Functor<$><*> text-0.11.2.3Data.Text.InternalText GHC.GenericsGenericattoparsec-0.10.4.0Data.Attoparsec.Numberghc-prim GHC.TypesNothing GFromJSON gParseJSONGToJSONgToJSONleftright parseIntegral vectorToJSONvectorParseJSON$fFromJSONLast $fToJSONLast$fFromJSONFirst $fToJSONFirst$fFromJSONDual $fToJSONDual$fFromJSON(,,,) $fToJSON(,,,)$fFromJSON(,,) $fToJSON(,,) $fFromJSON(,) $fToJSON(,)$fFromJSONUTCTime$fToJSONUTCTime$fFromJSONZonedTime$fToJSONZonedTime$fFromJSONDotNetTime$fToJSONDotNetTime$fFromJSONValue $fToJSONValue$fFromJSONHashMap$fToJSONHashMap$fFromJSONHashMap0$fToJSONHashMap0$fFromJSONHashMap1$fToJSONHashMap1$fFromJSONHashMap2$fToJSONHashMap2$fFromJSONHashMap3$fToJSONHashMap3 $fFromJSONMap $fToJSONMap$fFromJSONMap0 $fToJSONMap0$fFromJSONMap1 $fToJSONMap1$fFromJSONMap2 $fToJSONMap2$fFromJSONMap3 $fToJSONMap3$fFromJSONIntMap$fToJSONIntMap$fFromJSONIntSet$fToJSONIntSet$fFromJSONHashSet$fToJSONHashSet $fFromJSONSet $fToJSONSet$fFromJSONVector$fToJSONVector$fFromJSONVector0$fToJSONVector0$fFromJSONVector1$fToJSONVector1$fFromJSONVector2$fToJSONVector2 $fFromJSON[] $fToJSON[]$fFromJSONByteString$fToJSONByteString$fFromJSONByteString0$fToJSONByteString0$fFromJSONText $fToJSONText$fFromJSONText0 $fToJSONText0$fFromJSONWord64$fToJSONWord64$fFromJSONWord32$fToJSONWord32$fFromJSONWord16$fToJSONWord16$fFromJSONWord8 $fToJSONWord8$fFromJSONWord $fToJSONWord$fFromJSONInt64 $fToJSONInt64$fFromJSONInt32 $fToJSONInt32$fFromJSONInt16 $fToJSONInt16$fFromJSONInt8 $fToJSONInt8$fFromJSONInteger$fToJSONInteger $fFromJSONInt $fToJSONInt$fFromJSONFixed $fToJSONFixed$fFromJSONRatio $fToJSONRatio$fFromJSONFloat $fToJSONFloat$fFromJSONNumber$fToJSONNumber$fFromJSONDouble$fToJSONDouble$fFromJSONChar $fToJSONChar $fFromJSON[]0 $fToJSON[]0 $fFromJSON() $fToJSON()$fFromJSONBool $fToJSONBool$fFromJSONEither$fToJSONEither$fFromJSONMaybe $fToJSONMaybeFalseTrueIsRecordGFromSum gParseSum GFromProduct gParseProductTagged2 unTagged2 ProductSize productSize GFromRecord gParseRecord ConsFromJSON'consParseJSON' ConsFromJSON consParseJSONGObjectgObjectGProductToValuesgProductToValuesGRecordToPairsgRecordToPairsTaggedunTagged ConsToJSON' consToJSON' ConsToJSON consToJSONnotFound$fIsRecordU1False$fIsRecordK1True $fIsRecordM1b$fIsRecordM1False$fIsRecord:*:b $fGFromSumM1 $fGFromSum:+:$fGFromProductM1$fGFromProduct:*:$fProductSizeM1$fProductSize:*:$fGFromRecordM1$fGFromRecord:*:$fConsFromJSON'Falsef$fConsFromJSON'Truef$fConsFromJSONf$fGFromJSON:+:$fGFromJSON:*: $fGFromJSONM1 $fGFromJSONU1 $fGFromJSONK1$fGFromJSONM10 $fGObjectM1 $fGObject:+:$fGProductToValuesa$fGProductToValues:*:$fGRecordToPairsM1$fGRecordToPairs:*:$fConsToJSON'Falsef$fConsToJSON'Truef $fConsToJSONf $fGToJSON:+: $fGToJSON:*: $fGToJSONM1 $fGToJSONU1 $fGToJSONK1 $fGToJSONM10jstring_json_object_object_' objectValuesarray_array_' arrayValues doubleQuote backslashunescapehexQuad decodeWitheitherDecodeWithData.Text.Lazy.BuilderBuilder toLazyTextbytestring-0.10.0.2Data.ByteString.Lazy.Internal ByteStringstring fromNumber<>RQext2'ext2Q'ext2R'unRunQFTtoJSON_genericparseJSON_genericmodFailmodErroridvector-0.10.9.1 Data.VectorcreateData.Vector.Mutable unsafeNew unsafeWrite encodeArgs unsafeIndex consFromJSON parseArgs parseProductwithTypetemplate-haskellLanguage.Haskell.TH.SyntaxName getConNametvbName conNameExp fieldNameExp valueConNameCon matchFailedparseTypeMismatch lookupFieldunknownFieldFail noObjectFailwrongPairCountFailconNotFoundFailparseTypeMismatch'