mò DµMc@s«dZdkZdkZdkZdklZd„ZeƒZdgZei ei Bei BZ d„Z e ƒ\ZZZdefd„ƒYZd„Zdd „Zhd e<d e<d e|dB}|d7}nt!|ƒ}|}| |ƒq3Wdi"| ƒ|fS(s®Scan the string s for a JSON string. End is the index of the character in s after the quote that started the JSON string. Unescapes all valid JSON string escape sequences and raises ValueError on attempt to decode an invalid string. If strict is False then literal control characters are allowed in the string. Returns a tuple of the decoded string and the index of the character in s after the end quote.isUnterminated string starting atR*s\sInvalid control character %r attusInvalid \escape: iisInvalid \uXXXX escapeiiØiÿÛiÿÿs#Invalid \uXXXX\uXXXX surrogate pairis\ui ii iÜiuN(#tencodingRtDEFAULT_ENCODINGtchunkstappendt_appendRtbegint_mtstchunkRtgroupstcontentt terminatort isinstancetunicodetstrictRtesct IndexErrort_btchartKeyErrortreprtnext_endtlentinttuniR t maxunicodetesc2tuni2tunichrtjoin(R9RR2R@RCR8R:RDR=R4R<R6RRAR7RLRMRJRG((Rt py_scanstringasp             . s [ \t\n\r]*s c Cs1|\} } |djo h}n|i} g}| | | d!}|djoË||jo*|| | ƒiƒ} | | | d!}n|djo`|dj o||ƒ} | | dfSnh}|dj o||ƒ}n|| dfSq|djot d| | ƒ‚qn| d7} x¯to§t| | ||ƒ\} } | | | ƒ} | | | d!djoG|| | ƒiƒ} | | | d!djot d| | ƒ‚q¸n| d7} yQ| | |jo<| d7} | | |jo|| | dƒiƒ} qnWntj onXy|| | ƒ\}} Wn%tj ot d| | ƒ‚nX|i| |fƒyB| | }||jo'|| | dƒiƒ} | | }nWntj o d}nX| d7} |djoPn(|d jot d | | dƒ‚nyg| | }||joL| d7} | | }||jo'|| | dƒiƒ} | | }q„nWntj o d}nX| d7} |djot d| | dƒ‚q(q(W|dj o||ƒ} | | fSnt|ƒ}|dj o||ƒ}n|| fS( NiR*t}sExpecting property namet:sExpecting : delimitersExpecting objecttt,sExpecting , delimiter(R9RtmemoRt setdefaulttmemo_gettpairstnextchart_wst_wtobject_pairs_hooktresultt object_hookRtTrueRR2R@tkeyRBt scan_oncetvaluet StopIterationR5tdict(t.0R2R@RaR^R\RUR[RZR9RR]RWR`RYRXRb((Rt JSONObjectµs’              %                  c CsÜ|\}}g}|||d!} | |jo.|||dƒiƒ}|||d!} n| djo||dfSn|i}xItoAy|||ƒ\}}Wn%t j ot d||ƒ‚nX||ƒ|||d!} | |jo.|||dƒiƒ}|||d!} n|d7}| djoPn$| djot d||ƒ‚nyQ|||jo<|d7}|||jo|||dƒiƒ}q¶nWq‰t j oq‰Xq‰W||fS(Nit]sExpecting objectRTsExpecting , delimiter(R9RtvaluesRYRZR[R5R6R_RaRbRcRRB( ReRaR[RZR9RR6RhRbRY((Rt JSONArrays@          % cBsGtZdZeeeeeeed„Zeid„Zdd„Z RS(sSimple JSON decoder Performs the following translations in decoding by default: +---------------+-------------------+ | JSON | Python | +===============+===================+ | object | dict | +---------------+-------------------+ | array | list | +---------------+-------------------+ | string | unicode | +---------------+-------------------+ | number (int) | int, long | +---------------+-------------------+ | number (real) | float | +---------------+-------------------+ | true | True | +---------------+-------------------+ | false | False | +---------------+-------------------+ | null | None | +---------------+-------------------+ It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as their corresponding ``float`` values, which is outside the JSON spec. cCsŽ||_||_||_|pt|_|pt|_|pt i |_||_ t |_ t|_t|_h|_t|ƒ|_dS(s *encoding* determines the encoding used to interpret any :class:`str` objects decoded by this instance (``'utf-8'`` by default). It has no effect when decoding :class:`unicode` objects. Note that currently only encodings that are a superset of ASCII work, strings of other encodings should be passed in as :class:`unicode`. *object_hook*, if specified, will be called with the result of every JSON object decoded and its return value will be used in place of the given :class:`dict`. This can be used to provide custom deserializations (e.g. to support JSON-RPC class hinting). *object_pairs_hook* is an optional function that will be called with the result of any object literal decode with an ordered list of pairs. The return value of *object_pairs_hook* will be used instead of the :class:`dict`. This feature can be used to implement custom decoders that rely on the order that the key and value pairs are decoded (for example, :func:`collections.OrderedDict` will remember the order of insertion). If *object_hook* is also defined, the *object_pairs_hook* takes priority. *parse_float*, if specified, will be called with the string of every JSON float to be decoded. By default, this is equivalent to ``float(num_str)``. This can be used to use another datatype or parser for JSON floats (e.g. :class:`decimal.Decimal`). *parse_int*, if specified, will be called with the string of every JSON int to be decoded. By default, this is equivalent to ``int(num_str)``. This can be used to use another datatype or parser for JSON integers (e.g. :class:`float`). *parse_constant*, if specified, will be called with one of the following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to raise an exception if invalid JSON numbers are encountered. *strict* controls the parser's behavior when it encounters an invalid control character in a string. The default setting of ``True`` means that unescaped control characters are parse errors, if ``False`` then control characters will be allowed in strings. N(R2RR^R\t parse_floattfloatt parse_intRItparse_constantt _CONSTANTSt __getitem__R@Rft parse_objectRit parse_arrayRt parse_stringRUt make_scannerRa(RR2R^RjRlRmR@R\((RRSs-        cCsu|i|d||dƒiƒƒ\}}|||ƒiƒ}|t|ƒjotd||t|ƒƒ‚n|S(szReturn the Python representation of ``s`` (a ``str`` or ``unicode`` instance containing a JSON document) tidxis Extra dataN(Rt raw_decodeR9R[RtobjRHR(RR9R[RRv((RR Žs *icCsNy|i||ƒ\}}Wn%tj otd||ƒ‚nX||fS(sLDecode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. sNo JSON object could be decodedN(RRaR9RtRvRRcR(RR9RtRRv((RRu™s ( R"R#R$RR_Rt WHITESPACEtmatchR Ru(((RR5s ; (%R$treR RtscannerRsRt c_scanstringt__all__tVERBOSEt MULTILINEtDOTALLtFLAGSRR)tPosInftNegInfRRRRRRntcompilet STRINGCHUNKt BACKSLASHR3R_RxRPRRwtWHITESPACE_STRRfRitobjectR(RRR†R{R‚RnRR|RR)R…RyRPRR R€RRsR„RwRiRR3RRfR((Rt?s0         !NO \$