Îõ³h$QßLÊž      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œNone  '(35>?ÀÉÎÔ×ÙÙ9žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎNone  '(35>?ÀÉÎÔ×ÙL46unjson6Formatting options when serializing to JSON. Used in -, / and 0. unjson'Pretty format. Use spaces and newlines. unjson*Amount of spaces for indent. 4 looks good. unjson1Output explicit nulls for absent optional fields. unjsonäDefine a relation between a field of an object in JSON and a field in a Haskell record structure.  ì holds information about a documentation string, key name, Haskell data accessor and parsing definition.  > has three cases for fields that are required, optional (via Ï) or jave default value.unjsonOpaque % defines a bidirectional JSON parser.unjson2Specify how arrays should be handled. Default is 0 that does not do anything special with arrays. is used in F and D.unjson2Require JSON array. On output always output array.unjsonóAllow non-array element, in that case it will be treated as a single element array. On output always output array.unjsonAllow non-array element, in that case it will be treated as a single element array. On output output single element if array has one element.unjsonâ typeclass describes all types that can be parsed from JSON and JSON generated from their values.Example declaration: Ìinstance Unjson Thing where unjsonDef = objectOf $ pure Thing <*> field "key1" thingField1 "Required field of type with Unjson instance" <*> fieldBy "key2" thingField2 "Required field with parser given below" unjsonForKey2 <*> fieldOpt "key4" thingField4 "Optional field of type with Unjson instance" <*> fieldOptBy "key5" thingField5 "Optional field with parser given below" unjsonForKey5 <*> fieldDef "key7" thingField7 "Optional field with default of type with Unjson instance" <*> fieldDefBy "key8" thingField8 "Optional field with default with parser given below" unjsonForKey8unjson0Definition of a bidirectional parser for a type a. See 3, 4,  serialize and K to see how to use . unjsonParsing result. The value a is only reliable when " is an empty list.". is list of issues encountered while parsing. Ç parsers continue forward and are able to find many problems at once.íNote that problems are anchored to specific elements of JSON so it should be easy to find and spot an error.ÓEven if list of problems is not empty, the returned value may be partially usable.Examples of list of problems: Â[Anchored [PathElemKey "credentials",PathElemKey "password"] "missing key", Anchored [PathElemKey "tuple"] "cannot parse array of length 3 into tuple of size 4", Anchored [PathElemKey "text_array",PathElemIndex 0.PathElemKey "value"] "when expecting a Text, encountered Boolean instead"]conveniently rendered as: °"credentials.password": "missing key" "tuple": "cannot parse array of length 3 into tuple of size 4" "text_array[0].value": "when expecting a Text, encountered Boolean instead""unjsonæIn general JSON deserialization may result in many problems. Unjson reports all the problems at once.#unjson(Problem information is represented as a Ð> attached to a specific point in the JSON represenation tree.$unjson.A value at a specific position in JSON object.&unjson&+s are rendered in a nice way. For example:  key.key2[34]Ç indexes into "key", then into "key2" then into index 34 of an array.(unjsonÈDescribe a path from root JSON element to a specific position. JSON has only two types of containers: objects and arrays, so there are only two types of keys needed to index into those containers: Ñ and Ð. See &.,unjson5Given a definition of a value and a value produce a Ò.Example: ;let v = Thing { ... } let json = unjsonToJSON unjsonThing v-unjson5Given a definition of a value and a value produce a Ò. Takes .Example: Älet v = Thing { ... } let json = unjsonToJSON' options unjsonThing v.unjson4Given a definition of a value and a value produce a Ó.Example: Êlet v = Thing { ... } let utf8bsrep = unjsonToByteStringLazy unjsonThing v/unjson5Given a definition of a value and a value produce a Ó. Also takes formatting .Example: Ólet v = Thing { ... } let utf8bsrep = unjsonToByteStringLazy' options unjsonThing v0unjson5Given a definition of a value and a value produce a Ô". Functionally it is the same as .ë but useful if json serialization is a part of some bigger serialization function. Also takes formatting .1unjson5Given a definition of a value and a value produce a Ô". Functionally it is the same as .Ó but useful if json serialization is a part of some bigger serialization function.2unjson5Given a definition of a value and a value produce a ÔÏ. Useful when JSON serialization is a part of a bigger serialization function.3unjson*Parse JSON according to unjson definition.Example: µlet json = Aeson.object [ ... ] let Result val iss = parse unjsonThing json if null iss then putStrLn ("Parsed: " ++ show val) else putStrLn ("Not parsed, issues: " ++ show iss)0Error reporting is a strong side of Unjson, see  .0For parsing of fields the following rules apply:8required fields generate an error if json key is missingÕfor optional fields Nothing is returned if json key is missing, Just value otherwise÷for fields with default value, the default value is returned if key is missing, otherwise the parsed value is returnedæNote that Unjson makes strong difference between missing keys and values that result in parse errors."For discussion of update mode see 4.4unjson7Update object with JSON according to unjson definition.Example: ìlet original = Thing { ... } let json = Aeson.object [ ... ] let Result val iss = update original unjsonThing (Anchored [] json) if null iss then putStrLn ("Updated: " ++ show val) else putStrLn ("Not updated, issues: " ++ show iss)0Error reporting is a strong side of Unjson, see  .1For updating of fields the following rules apply:>required fields take the original value if json key is missingÔoptional fields take the original value if json key is missing unless the value is null., then Nothing is returned (reset to Nothing)Þfields with default value take the original value if json key is missing unless the value is null8, then the default value is returned (reset to default)æNote that Unjson makes strong difference between missing keys and values that result in parse errors.!For discussion of parse mode see 3.5unjsonÂDeclare a required field with definition given inline by valuedef.Example: šunjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing <*> fieldBy "credentials" thingCredentials "Credentials to use" unjsonCredentials data Thing = Thing { thingCredentials :: Credentials, ... } unjsonCredentials :: UnjsonDef Credentials6unjson.Declare a required field with definition from  typeclass.Example: øunjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing <*> field "credentials" thingCredentials "Credentials to use" data Thing = Thing { thingCredentials :: Credentials, ... } instance Unjson Credentials where ...7unjson5Declare an optional field and definition by valuedef.Example: ¦unjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing <*> fieldOptBy "credentials" thingCredentials "Optional credentials to use" unjsonCredentials data Thing = Thing { thingCredentials :: Credentials, ... } unjsonCredentials :: UnjsonDef Credentials8unjson,Declare an optional field and definition by  typeclass.Example: „unjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing <*> fieldOpt "credentials" thingCredentials "Optional credentials to use" data Thing = Thing { thingCredentials :: Credentials, ... } instance Unjson Credentials where ...9unjson>Declare a field with default value and definition by valuedef.Example: ÐunjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing <*> fieldDefBy "credentials" defaultCredentials thingCredentials "Credentials to use, defaults to defaultCredentials" unjsonCredentials data Thing = Thing { thingCredentials :: Credentials, ... } unjsonCredentials :: UnjsonDef Credentials:unjson5Declare a field with default value and definition by  typeclass.Example: ÊunjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing <*> fieldDef "port" 80 thingPort "Port to listen on, defaults to 80" data Thing = Thing { thingPort :: Int, ... };unjson‡Declare a field that is readonly from the point of view of Haskell structures, it will be serialized to JSON but never read from JSON.Example: ¿unjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure (\s -> Thing 59123 s) <* fieldReadonly "port" thingPort "Random port the server is listening on" <*> field "string" thingString "Additional string" data Thing = Thing { thingPort :: Int, thingString :: String, ... }<unjson®Declare a field that is readonly from the point of view of Haskell structures, it will be serialized to JSON but never read from JSON. Accepts unjson parser as a parameter.Example: ÖunjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure (\s -> Thing 59123 s) <* fieldReadonlyBy "port" thingPort "Random port the server is listening on" unjsonPort <*> field "string" thingString "Additional string" data Thing = Thing { thingPort :: Port, thingString :: String, ... }=unjson×Declare an object as bidirectional mapping from JSON object to Haskell record and back.Example: âunjsonThing :: UnjsonDef Thing unjsonThing = objectOf $ pure Thing ...field definitions go here4Use field functions to specify fields of an object: 6, 5, 8, 7, : or 9.>unjson0Gather all keys with respective values in a map.Example: —data X = X { xMap :: LazyHashMap.HashMap Text.Text x } objectOf $ pure X <*> fieldBy "xmap" xMap "Map string to Y value" (mapOf unjsonY)ÖNote that overloading allows for automatic conversion to more map types, for example: ðdata X = X { xMap :: Map.Map String x } objectOf $ pure X <*> field "xmap" xMap "Map string to Y value"?unjson‡Provide sum type support. Bidirectional case matching in Haskell is not good, so some obvious information needs to be given manually.For related functionality see A.Example: Õdata X = A { aString :: String } | B { bInt :: Int } deriving (Data,Typeable) unjsonX = disjointUnionOf "type" [("a_thing", unjsonIsConstrByName "A", pure A <*> field "string" "A string value"), ("b_thing", unjsonIsConstrByName "B", pure B <*> field "string" "An int value")]‘Note that each case in the list must be able to discriminate between constructors in a data type and it has to be able to this both ways: to find out based on json contents which constructor applies and also based on data contructor which of serialization cases to use. Note that J$ is helpful, but you may use usual  case ... of if you do not like the Õ typeclass.@unjsonœProvide sum type support, non-disjoin version. Bidirectional case matching in Haskell is not good, so some obvious information needs to be given manually.For related functionality see A.Example: ­data X = A { aString :: String } | B { bInt :: Int } deriving (Data,Typeable) unjsonX = unionOf [(unjsonIsConstrByName "A", pure A <*> field "string" "A string value"), (unjsonIsConstrByName "B", pure B <*> field "int" "An int value")]àNote that each case in the list must be able to discriminate between constructors in a data type and it has to be able to this both ways: to find out based on json contents which constructor applies and also based on data contructor which of serialization cases to use. To know what constructor to use at parsing time unjson looks at fields present in json object and on list of field names required to satisfy. First constructor for which all fields are present is chosen. Note that J$ is helpful, but you may use usual  case ... of if you do not like the Õ typeclass.Aunjson8Provide sum type support for parameterless constructors.For related functionality see ?.Example: çdata X = A | B unjsonX = enumOf "type_thing" [("a_thing", A), ("b_thing", B)]Bunjson>Automatic sum type conversion with parameterless constructors."Basically an automatic version of A.Example: ädata X = A | B deriving (Eq, Data, Enum, Bounded) instance Unjson X where unjsonDef = enumUnjsonDefCunjsonÊDeclare array of values where each of them is described by valuedef. Use H to parse.Example: „unjsonArrayOfThings :: UnjsonDef [Thing] unjsonArrayOfThings = arrayOf unjsonThing unjsonThing :: UnjsonDef Thing unjsonThing = ...DunjsonÝDeclare array of values where each of them is described by valuedef. Accepts mode specifier.Example: „unjsonArrayOfThings :: UnjsonDef [Thing] unjsonArrayOfThings = arrayOf unjsonThing unjsonThing :: UnjsonDef Thing unjsonThing = ...Eunjson-Declare array of primitive values lifed from Aeson. Accepts mode specifier.Example: ÝunjsonArrayOfIntOrSimpleInt :: UnjsonDef [Int] unjsonArrayOfIntOrSimpleInt = arrayWithModeOf'FunjsonðDeclare array of objects with given parsers that should be matched by a primary key and accepts mode specifier."For discussion of primary key see G%. For discussion of array modes see .Example: ËunjsonArrayOfIntToInt :: UnjsonDef [(Int,Int)] unjsonArrayOfIntToInt = arrayWithPrimaryKeyOf ArrayModeParseSingle (fst) (objectOf $ pure id <*> field "key" id "Key in mapping") (objectOf $ pure (,) <*> field "key" fst "Key in mapping" <*> field "value" fst "Value in mapping")GunjsonÛDeclare array of objects with given parsers that should be matched by a primary key. Uses . Primary key:*Primary keys are used to match objects in 4ü mode. When a request to update array is issued and array has primary key specification then the following steps are used: Îprimary keys from old array elements are extracted and a mapping from primary key to element is created. Mapping is left biased meaning that first element with specific primary key in array is usedâfor each object in json array primary key is extracted and is looked up in old elements mapping$if mapping is found then element is 4.d, if mapping is not found then element is 3dÂin all cases the order of elements in the *new* array is respectedExample: ¶unjsonArrayOfIntToInt :: UnjsonDef [(Int,Int)] unjsonArrayOfIntToInt = arrayWithPrimaryKeyOf (fst) (objectOf $ pure id <*> field "key" id "Key in mapping") (objectOf $ pure (,) <*> field "key" fst "Key in mapping" <*> field "value" fst "Value in mapping")HunjsonUse Ö and × to create a €. This function is useful when lifted type is one of the primitives. Although it can be used to lift user defined instances, it is not advisable as there is too much information lost in the process and proper error infomation is not possible. Use full  instance whenever possible.Example: üinstance FromJSON MyType where ... instance ToJSON MyType where ... instance Unjson MyType where unjsonDef = unjsonAesonIunjsonLike HÊ but accepts docstring as additional parameter that should identify type.Junjson Useful in Ë as second element in tuples list to check out if constructor is matching.Example: 5data X = A | B | C unjsonIsConstrByName "B" B => TrueKunjson¡Renders documentation for a parser into a multiline string. It is expected that this string is a human readable representation that can go directly to console.Example rendering: Èhostname (req): The hostname this service is visible as Text port (def): Port to listen on, defaults to 80 Int credentials (req): User admin credentials username (req): Name of the user Text password (req): Password for the user Text domain (opt): Domain for user credentials Text comment (opt): Optional comment, free text Text options (def): Additional options, defaults to empty array of: Text alternates (opt): Alternate names for this server tuple of size 2 with elements: 0: Text 1: username (req): Name of the user Text password (req): Password for the user Text domain (opt): Domain for user credentials TextLunjsonÿRender only selected part of structure documentation. Path should point to a subtree, if it does not then Nothing is returned.Munjson*Renders documentation for a parser into a Ø. See K for example.Nunjson9Render only selected part of structure documentation as ØË. Path should point to a subtree, if it does not then Nothing is returned.OunjsonÉParse and serialize dotted decimal notation for IPv4 addresses and uses ÙÛ as representation type. Note that network byte order applies, so 127.0.0.1 is 0x7F000001.È  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOÈ,-./102 =6587:9;< CDEGF>AB?@HIKLMN34 !$%#"&'()*+JOÚ       !""#$%%&&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸž ž¡ž¢ž£ž¤ž¥ž¦ž§ž¨ž©žªž«ž¬ž­ž®ž¯ž°ž±ž²ž³ž´žµž¶ž·ž¸ž¹žºž»ž¼ž½ž¾ž¿žÀžÁžÂžÃžÄžÅžÆžÇžÈžÉžÊžËžÌžÍžÎžÏÐÑÒÓÔÕÖרÙÚÛÜÝÛÞßÐàáâãäåæçèÐéêë$unjson-0.15.4-JwIqv13d5KRAHstVyN0j72!Data.Unjson.Internal.Aeson.Compat Data.Unjson LazyKeyMapfromTexttoText fromStringtoString convertPairtestErrorMessagelazyKeyMapFromListOptionsprettyindentnullsFieldDef FieldReqDef FieldOptDef FieldDefDef FieldRODef UnjsonDefSimpleUnjsonDefArrayUnjsonDefObjectUnjsonDefTupleUnjsonDefDisjointUnjsonDefUnionUnjsonDef MapUnjsonDef ArrayModeArrayModeStrictArrayModeParseSingleArrayModeParseAndOutputSingleUnjson unjsonDefResultProblemsProblemAnchoredPathPathElem PathElemKey PathElemIndex unjsonInvmapR unjsonToJSON unjsonToJSON'unjsonToByteStringLazyunjsonToByteStringLazy'unjsonToByteStringBuilder'unjsonToByteStringBuilderunjsonToByteStringBuilder''parseupdatefieldByfield fieldOptByfieldOpt fieldDefByfieldDef fieldReadonlyfieldReadonlyByobjectOfmapOfdisjointUnionOfunionOfenumOf enumUnjsonDefarrayOfarrayWithModeOfarrayWithModeOf'arrayWithModeAndPrimaryKeyOfarrayWithPrimaryKeyOf unjsonAesonunjsonAesonWithDocunjsonIsConstrByNamerender renderForPath renderDocrenderDocForPathunjsonIPv4AsWord32 $fShowPath$fExceptionAnchored$fShowAnchored$fMonadFailResult $fMonadResult$fApplicativeResult$fInvariantUnjsonDef$fUnjson(,,,,,,,,,,,)$fUnjson(,,,,,,,,,,)$fUnjson(,,,,,,,,,)$fUnjson(,,,,,,,,)$fUnjson(,,,,,,,)$fUnjson(,,,,,,)$fUnjson(,,,,,)$fUnjson(,,,,) $fUnjson(,,,) $fUnjson(,,) $fUnjson(,)$fUnjsonKeyMap $fUnjsonMap $fUnjsonMap0 $fUnjsonMap1$fUnjsonVector$fUnjsonVector0$fUnjsonVector1$fUnjsonVector2$fUnjsonHashSet $fUnjsonSet$fUnjsonIntMap $fUnjsonDual $fUnjsonFixed $fUnjsonRatio $fUnjsonValue$fUnjsonDotNetTime$fUnjsonUTCTime$fUnjsonZonedTime $fUnjsonText$fUnjsonScientific$fUnjsonIntSet $fUnjsonText0 $fUnjson()$fUnjsonWord64$fUnjsonWord32$fUnjsonWord16 $fUnjsonWord8 $fUnjsonWord$fUnjsonInteger $fUnjsonInt64 $fUnjsonInt32 $fUnjsonInt16 $fUnjsonInt8 $fUnjsonInt $fUnjsonFloat$fUnjsonDouble $fUnjsonChar $fUnjsonBool $fUnjson[] $fUnjson[]0 $fEqOptions $fOrdOptions $fShowOptions $fEqArrayMode$fOrdArrayMode$fShowArrayMode$fFunctorResult $fShowResult $fOrdResult $fEqResult$fFunctorAnchored $fEqAnchored $fOrdAnchored$fEqPath $fOrdPath$fSemigroupPath $fMonoidPath $fEqPathElem $fOrdPathElem$fShowPathElem$aeson-2.0.3.0-HoBWSDM3qT941k5ljFeQlIData.Aeson.KeyMap fromMapText toMapTextfromHashMapText toHashMapText alignWithKey alignWithmapMaybeWithKeymapMaybe filterWithKeyfilter mapKeyVal coercionToMapcoercionToHashMapfromMaptoMap fromHashMap toHashMapkeysintersectionWithKeyintersectionWith intersection unionWithKey unionWithunion difference toAscListelemstoListfromList fromListWithtraverseWithKeytraverse foldrWithKeyfoldl'foldlfoldr'foldrfoldMapWithKeymapinsertlookupalterFdeletemember singletonsizenullemptyKeyMapbase GHC.MaybeMaybe text-1.2.3.2Data.Text.InternalTextghc-prim GHC.TypesIntData.Aeson.Types.InternalValuebytestring-0.10.10.0Data.ByteString.Lazy.Internal ByteString Data.ByteString.Builder.InternalBuilder Data.DataDataData.Aeson.Types.FromJSONfromJSONData.Aeson.Types.ToJSONtoJSONpretty-1.1.3.6Text.PrettyPrint.HughesPJDocGHC.WordWord32