6LCU      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST portable experimental%Bryan O'Sullivan <bos@serpentine.com>None8Specifies how to encode constructors of a sum datatype. =A constructor will be encoded to a 2-element array where the > first element is the tag of the constructor (modified by the   %) and the second element the encoded  contents of the constructor. 9A constructor will be encoded to an object with a single 8 field named after the constructor tag (modified by the   () which maps to the encoded contents of  the constructor. 8A constructor will be encoded to an object with a field  2 which specifies the constructor tag (modified by  the  "). If the constructor is a record A the encoded record fields will be unpacked into this object. So ! make sure that your record doesn't have a field with the same  label as the %. Otherwise the tag gets overwritten A by the encoded value of that field! If the constructor is not a > record the encoded constructor contents will be stored under  the  field. "Options that specify how to encode/decode your datatype to/ from JSON. "Function applied to field labels. 8 Handy for removing common record prefixes for example. :Function applied to constructor tags which could be handy $ for lower-casing them for example. If U& the constructors of a datatype, with all = nullary constructors, will be encoded to just a string with  the constructor tag. If V the encoding will always  follow the  . If U record fields with a W value will be ' omitted from the resulting object. If V the resulting - object will include those fields mapping to null. 8Specifies how to encode constructors of a sum datatype. A 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. XSuccess continuation. YFailure continuation. The result of running a . The empty array. ZDetermines 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. ! If the inner Parser. failed, modify the failure message using the O provided function. This allows you to create more descriptive error messages.  For example:  & parseJSON (Object o) = modifyFailure . ("Parsing of the Foo value failed: " ++)  (Foo <$> o .: "someField") Since 0.6.2.0 "Default encoding :     {  = id  ,   = id  ,   = True  ,   = False  ,   = #  } #Default   options:   defaultTaggedObject =   {  = "tag"  ,  = "contents"  } : ]^XY_Z !"#`abcdefghijklmno% Z !"#% ]^XY_Z !"#`abcdefghijklmnoportable experimental%Bryan O'Sullivan <bos@serpentine.com>Nonep Transform a q into a r while transforming the keys. s Transform a q into a r while transforming the keys. t#Transform the keys and values of a r. uTransform the keys of a r. pstuvwxpstuvwxpstuvwx portable experimental%Bryan O'Sullivan <bos@serpentine.com>None$A newtype wrapper for y! 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 z, 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 8 "x" }  v 8 "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  ~* 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  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 Note that, instead of using DefaultSignatures, it's also possible , to parameterize the generic decoding using 0 applied  to your encoding/ decoding :   instance FromJSON Coord where  parseJSON = 0 " )&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" 6 x, "y" 6 y] Note the use of the OverloadedStrings" language extension which enables  ~* 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  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 Note that, instead of using DefaultSignatures, it's also possible , to parameterize the generic encoding using / applied  to your encoding/ decoding :   instance ToJSON Coord where  toJSON = / " +'Class of generic representation types (#) that can be converted from JSON. ,This method (applied to ") is used as the # default generic implementation of (. -'Class of generic representation types (!) that can be converted to JSON. .This method (applied to ") is used as the # default generic implementation of *. />A configurable generic JSON encoder. This function applied to  " is used as the default for * when the type  is an instance of . 0>A configurable generic JSON decoder. This function applied to  " is used as the default for ( when the  type is an instance of . 1withObject expected f value applies f to the  when value is an Object  and fails using ; expected otherwise. 2withObject expected f value applies f to the ~ when value is a String  and fails using ; expected otherwise. 3withObject expected f value applies f to the  when value is an Array  and fails using ; expected otherwise. 4withObject expected f value applies f to the  when value is a Number  and fails using ; expected otherwise. 5withObject expected f value applies f to the  when value is a Bool  and fails using ; expected otherwise. 6 Construct a   from a key and a value. 7>Convert a value from JSON, failing if the types do not match. 87Retrieve the value associated with the given key of an .  The result is z/ 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. 97Retrieve the value associated with the given key of an .  The result is W if the key is not present, or z 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 9 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 9 "opt_field_with_dfl" .!= " default_val"  v2 <- o 8 "mandatory_field"  v3 <- o 9 " opt_field2" ;AFail parsing due to a type mismatch, with a descriptive message. $%&'()*+,-./0123456789:;.The name of the type you are trying to parse. The actual value encountered. $%&'()*+,-./0123456789:;$%&'()*+,-./0123456789:; portable experimental%Bryan O'Sullivan <bos@serpentine.com>None3Get the name of the constructor of a sum datatype. }     index length  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrd      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrportable experimental%Bryan O'Sullivan <bos@serpentine.com>None<  !"#$%&'()*+,-./0123456789:;< $%&;'(7)*!+,-./012345689:  "# 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. s(Parse a string without a leading quote. tAParse a top-level JSON value followed by optional whitespace and  end-of-input. See also: <. uAParse a top-level JSON value followed by optional whitespace and  end-of-input. See also: =. <=vwxyz{|>?}~@stu <=>?@tu<=vwxyz{|>?}~@stuportable experimental%Bryan O'Sullivan <bos@serpentine.com>None<=>?@<>@=?portable experimental%Bryan O'Sullivan <bos@serpentine.com>NoneAEncode a JSON value to a . You can convert this to a  string using e.g. #, or encode straight to UTF-8 (the  standard JSON encoding) using B. B-Efficiently serialize a JSON value as a lazy . ABABABABportable DEPRECATED%Bryan O'Sullivan <bos@serpentine.com>None!The type constructor for readers !The type constructor for queries C-Efficiently serialize a JSON value as a lazy . D1Efficiently deserialize a JSON value from a lazy . 3 If this fails due to incomplete or invalid input, W is  returned. >This function parses immediately, but defers conversion. See  < for details. E1Efficiently deserialize a JSON value from a lazy . 3 If this fails due to incomplete or invalid input, W is  returned. ?This function parses and performs conversion immediately. See  = for details. Flexible type extension 0Type extension of queries for type constructors 0Type extension of readers for type constructors CDEFGCDEFGDECGFCDEFGportable experimental%Bryan O'Sullivan <bos@serpentine.com>NoneH1Efficiently deserialize a JSON value from a lazy . 3 If this fails due to incomplete or invalid input, W is  returned. CThe input must consist solely of a JSON document, with no trailing E data except for whitespace. This restriction is necessary to ensure @ that if data is being lazily read from a file handle, the file A handle will be closed in a timely fashion once the document has  been parsed. >This function parses immediately, but defers conversion. See  < for details. I3Efficiently deserialize a JSON value from a strict . 3 If this fails due to incomplete or invalid input, W is  returned. CThe input must consist solely of a JSON document, with no trailing  data except for whitespace. >This function parses immediately, but defers conversion. See  < for details. J1Efficiently deserialize a JSON value from a lazy . 3 If this fails due to incomplete or invalid input, W is  returned. CThe input must consist solely of a JSON document, with no trailing E data except for whitespace. This restriction is necessary to ensure @ that if data is being lazily read from a file handle, the file A handle will be closed in a timely fashion once the document has  been parsed. ?This function parses and performs conversion immediately. See  = for details. K1Efficiently deserialize a JSON value from a lazy . 3 If this fails due to incomplete or invalid input, W is  returned. CThe input must consist solely of a JSON document, with no trailing  data except for whitespace. ?This function parses and performs conversion immediately. See  = for details. LLike H3 but returns an error message when decoding fails. MLike I3 but returns an error message when decoding fails. NLike J3 but returns an error message when decoding fails. OLike K3 but returns an error message when decoding fails. HIJKLMNO/ $%&'()*+,-./0123456789:<=BHIJKLMNO/HJLNBIKMO$%&'(7)*+,-./012345689: <=HIJKLMNOportable experimentalNonePGenerates both ) and '% instance declarations for the given  data type. DThis is a convienience function which is equivalent to calling both  Q and S. Q Generates a )/ instance declaration for the given data type. RIGenerates a lambda expression which encodes the given data type as JSON. Helper function used by both Q and R. Generates code M to generate the JSON encoding of a number of constructors. All constructors  must be from the same type. If constructor is nullary. FGenerates code to generate the JSON encoding of a single constructor. S Generates a '/ instance declaration for the given data type. TJGenerates a lambda expression which parses the JSON encoding of the given  data type. Helper function used by both S and T . Generates O code to parse the JSON encoding of a number of constructors. All constructors  must be from the same type. CGenerates code to parse the JSON encoding of a single constructor. 6Generates code to parse the JSON encoding of an n-ary  constructor. #Boilerplate for top level splices.  The given 3 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. &Extracts the name from a constructor. /Extracts the name from a type variable binder. 4Makes a string literal expression from a constructor's name. ?Creates a string literal expression from a record field label. The name of the outermost  constructor. +PEncoding options. 'Name of the type for which to generate ) and '  instances. QEncoding options. )Name of the type for which to generate a ) instance  declaration. REncoding options. Name of the type to encode. Encoding options. 9Constructors for which to generate JSON generating code. SEncoding options. )Name of the type for which to generate a ' instance  declaration. TEncoding options. Name of the encoded type. 3Name of the type to which the constructors belong. Encoding options 6Constructors for which to generate JSON parsing code. 3Name of the type to which the constructor belongs. Encoding options. 5Constructor for which to generate JSON parsing code.  Left (valFieldName, objName) or  Right valName 3Name of the type to which the constructor belongs. structor name. structor arity. 9Function that generates the actual code. Will be applied 9 to the type variable binders and constructors extracted  from the given . Resulting value in the  uasi monad. Encoding options  "#PQRST "#PQSRT*PQRST   !"#$%&'()*+, - - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G HIJJKL2?KMLNOPQRSTUVWXYZXY[\]^"_`\]a\bc defghijklmnopqrstuvwxyz{|}~K\\\\\\XY                [ Z                     ! " # $  % & ' ( ) * + , -  . / 0 1  2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                0-/ aeson-0.6.2.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.Internal SumEncoding TwoElemArrayObjectWithSingleField TaggedObject tagFieldNamecontentsFieldNameOptionsfieldLabelModifierconstructorTagModifierallNullaryToStringTagomitNothingFields sumEncodingPairValueNullBoolNumberStringArrayObjectParserResultSuccessError emptyArray emptyObjectparse parseMaybe parseEitherobject modifyFailuredefaultOptionsdefaultTaggedObject DotNetTimefromDotNetTimeFromJSON parseJSONToJSONtoJSON GFromJSON gParseJSONGToJSONgToJSON genericToJSONgenericParseJSON withObjectwithText withArray withNumberwithBool.=fromJSON.:.:?.!= typeMismatchjsonjson'valuevalue'jstring fromValueencodedecodedecode' decodeStrict decodeStrict' eitherDecodeeitherDecodeStrict eitherDecode'eitherDecodeStrict' deriveJSON deriveToJSONmkToJSONderiveFromJSON mkParseJSONghc-prim GHC.TypesTrueFalsebase Data.MaybeNothingFailure isEmptyArrayMaybe 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.GenericsGenericRepattoparsec-0.10.4.0Data.Attoparsec.Numberleftright 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 $fToJSONMaybe GetConNameTagged2 unTagged2TaggedunTaggedAnd AllNullaryIsRecordFromPair parsePair FromProduct parseProduct ProductSize productSize FromRecord parseRecord ConsFromJSON'consParseJSON' ConsFromJSON consParseJSONFromTaggedObject''parseFromTaggedObject''FromTaggedObject'parseFromTaggedObject'FromTaggedObjectparseFromTaggedObject SumFromStringparseSumFromStringParseSumparseSumobjectWithSingleField WriteProduct writeProduct RecordToPairs recordToPairs ConsToJSON' consToJSON' ConsToJSON consToJSON twoElemArray getConName TaggedObject' taggedObject' taggedObject SumToJSON sumToJSONnonAllNullarySumToJSON fieldToPairparseAllNullarySumparseNonAllNullarySumnotFound$fAndTrueFalseFalse$fAndFalseTrueFalse$fAndFalseFalseFalse$fAndTrueTrueTrue$fAllNullaryU1True$fAllNullaryK1False$fAllNullary:*:False$fAllNullaryM1allNullary$fAllNullary:+:allNullary$fIsRecordU1False$fIsRecordK1True$fIsRecordM1isRecord$fIsRecordM1False$fIsRecord:*:isRecord $fFromPairM1 $fFromPair:+:$fFromProductM1$fFromProduct:*:$fProductSizeM1$fProductSize:*:$fFromRecordM1$fFromRecordM10$fFromRecord:*:$fConsFromJSON'fFalse$fConsFromJSON'fTrue$fConsFromJSONf$fFromTaggedObject''fFalse$fFromTaggedObject''fTrue$fFromTaggedObject'f$fFromTaggedObjectM1$fFromTaggedObject:+:$fSumFromStringM1$fSumFromString:+:$fParseSum:+:False$fParseSum:+:True$fGFromJSON:+:$fGFromJSON:*: $fGFromJSONM1 $fGFromJSONU1 $fGFromJSONK1$fGFromJSONM10$fObjectWithSingleFieldM1$fObjectWithSingleField:+:$fWriteProducta$fWriteProduct:*:$fRecordToPairsM1$fRecordToPairsM10$fRecordToPairs:*:$fConsToJSON'fFalse$fConsToJSON'fTrue $fConsToJSONf$fTwoElemArrayM1$fTwoElemArray:+:$fGetConNameM1$fGetConName:+:$fTaggedObject'fFalse$fTaggedObject'fTrue$fTaggedObjectM1$fTaggedObject:+:$fSumToJSONfFalse$fSumToJSONfTrue $fGToJSON:+: $fGToJSON:*: $fGToJSONM1 $fGToJSONU1 $fGToJSONK1 $fGToJSONM10jstring_jsonEOFjsonEOF'json_object_object_' objectValuesarray_array_' arrayValues doubleQuote backslashunescapehexQuad decodeWithdecodeStrictWitheitherDecodeWitheitherDecodeStrictWithData.Text.Lazy.BuilderBuilder toLazyTextbytestring-0.10.0.2Data.ByteString.Lazy.Internal ByteStringstring fromNumber<>RQext2'ext2Q'ext2R'unRunQFTtoJSON_genericparseJSON_genericmodFailmodErrorData.ByteString.Internal isNullary encodeArgs consFromJSON parseArgswithTypetemplate-haskellLanguage.Haskell.TH.SyntaxNametvbName conNameExp fieldLabelExp valueConName LookupField lookupFieldconStrconTxt conStringE encodeSumparseNullaryMatchesparseUnaryMatches getValFieldCon matchFailedparseTypeMismatchunknownFieldFail noArrayFail noObjectFailfirstElemNoStringFailwrongPairCountFail noStringFail noMatchFail not2ElemArrayconNotFoundFail2ElemArray conNotFoundFailObjectSingleFieldconNotFoundFailTaggedObjectparseTypeMismatch'$fLookupFieldMaybe$fLookupFielda