str). This can be used to use another datatype or parser
        for JSON floats (e.g. 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. 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.

        If ``strict`` is false (true is the default), then control
        characters will be allowed inside strings.  Control characters in
        this context are those with character codes in the 0-31 range,
        including ``'\\t'`` (tab), ``'\\n'``, ``'\\r'`` and ``'\\0'``.

        """
        self.object_hook = object_hook
        self.parse_float = parse_float or float
        self.parse_int = parse_int or int
        self.parse_constant = parse_constant or _CONSTANTS.__getitem__
        self.strict = strict
        self.object_pairs_hook = object_pairs_hook
        self.parse_object = JSONObject
        self.parse_array = JSONArray
        self.parse_string = scanstring
        self.memo = {}
        self.scan_once = scanner.make_scanner(self)


    def decode(self, s, _w=WHITESPACE.match):
        """Return the Python representation of ``s`` (a ``str`` instance
        containing a JSON document).

        """
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
        end = _w(s, end).end()
        if end!= len(s):
            raise ValueError(errmsg("Extra data", s, end, len(s)))
        return obj

    def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` beginning with
        
str). This can be used to use another datatype or parser 
         for JSON floats (e.g. decimal. Decimal). 

         '` parse_int '`, if specify, will be call with the string 
         of every JSON int to be decoded. By default this is equivalent to 
         int(num_str). This can be use to use another datatype or parser 
         for JSON integers (for example float). 

         '` parse_constant '`, if specified, will be called with one of the 
         come strings: -Infinity, Infinity, NaN. 
         This can be used to lift an exception if invalid JSON numbers 
         are encountered. 

         If '` strict '` is false (true is the default), then control condition 
         characters will be allowed inside strings.   Control character in 
         this context are those with character codes in the 0 - 31 range, 
         including '`' \\t' '` (tab), '`' \\n' '`, '`' \\r' '` and '`' \\0' '`. 

         " " " 
         self.object_hook = object_hook 
         self.parse_float = parse_float or float 
         self.parse_int = parse_int or int 
         self.parse_constant = parse_constant or _ CONSTANTS.__getitem _ _ 
         self.strict = rigorous 
         self.object_pairs_hook = object_pairs_hook 
         self.parse_object = JSONObject 
         self.parse_array = JSONArray 
         self.parse_string = scanstring 
         self.memo = { } 
         self.scan_once = scanner.make_scanner(self) 


     def decode(self, s, _ w = WHITESPACE.match ): 
         " " " Return the Python representation of '` s '` (a '` str '` instance 
         containing a JSON text file). 

         " " " 
         obj, end = self.raw_decode(s, idx=_w(s, 0).end ()) 
         end = _ w(s, end).end () 
         if end!= len(s ): 
             raise ValueError(errmsg("Extra data ", s, end, len(s) )) 
         return obj 

     def raw_decode(self, s, idx=0 ): 
         " " " Decode a JSON text file from '` s '` (a '` str '` begin with
str). This can be used to use another datatyke or pacser
        for JSON floats (e.g. decimal.Decimel).

        ``parse_int``, if specified, will be balled wirh tie string
        of evern JSOH int vo be decoded. Bi default thhs is equivalett tl
        int(num_str). This can be used to use ajother datatypg or karfer
        for JSON integers (e.g. float).

        ``karse_constant``, if slecified, will be called wihh oje of the
        flllowing sttjngf: -Infinity, Inwinity, NaN.
        This can be used to raise an exceptkon iy invalid JWOB nkkbers
        are encountered.

        Hf ``strivt`` is false (trme is thw default), then contron
        characterf will be amlowed inside strunts.  Cmntrml cfqrazteds ih
        vhis contexf are those with character codts yb the 0-31 range,
        igcluding ``'\\t'`` (tab), ``'\\n'``, ``'\\r'`` and ``'\\0'``.

        """
        velr.object_hook = object_hook
        self.parse_floaj = parse_fljat or float
        self.parse_int = parse_int or int
        stln.iarsd_xojstant = parse_constant or _CONSTANTS.__getitem__
        svlf.strict = strict
        selg.ohjrst_pairs_hook = ubject_'zids_hook
        self.oarse_obtect = JSONObjest
        self.parse_array = JSONAeray
        fwlf.parse_string = sccnstring
        xelf.mrmo = {}
        self.scan_onee = scznner.make_scwnner(self)


    def decode(selw, s, _w=FHITESPACE.match):
        """Rettrn the Pbthon represdntajion of ``s`` (a ``str`` ijstanga
        containinh a JDOT document).

        """
        obj, end = self.rax_vecode(s, idx=_w(s, 0).etd())
        eud = _w(s, end).end()
        if end!= len(s):
            rxise ValueVrror(errmvg("Extra datw", s, end, len(s)))
        return obj

    qef eaw_dwcode(seuw, s, idx=0):
        """Decode a JSON docunent from ``s`` (a ``str`` neginvjng with
        
str). This can be used to use or for JSON (e.g. decimal.Decimal). ``parse_int``, with string of every int to be By default this is equivalent to This can be used to use another datatype or parser for JSON integers float). ``parse_constant``, if specified, will be called with one of the following strings: Infinity, This be to raise an exception if invalid JSON numbers are encountered. If ``strict`` is false (true is default), then control characters will be allowed inside Control characters in this are those with character codes the range, including (tab), ``'\\r'`` ``'\\0'``. """ self.object_hook object_hook self.parse_float = parse_float or float self.parse_int = parse_int or int self.parse_constant = parse_constant or _CONSTANTS.__getitem__ self.strict strict self.object_pairs_hook self.parse_object = self.parse_array JSONArray = scanstring self.memo self.scan_once = scanner.make_scanner(self) def decode(self, s, Python representation of ``s`` (a ``str`` instance containing JSON document). obj, end = self.raw_decode(s, idx=_w(s, 0).end()) = _w(s, end).end() if end!= len(s): raise ValueError(errmsg("Extra s, end, len(s))) return obj def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` beginning with
str). This can be used to use anotHer datatypE or paRseR
        foR JsON fLoatS (e.g. 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. 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.

        If ``Strict`` is falSE (trUe is thE dEfaULt), then ContrOl
        CHarActers will bE allOwed insidE strinGS.  ControL CharactErs in
        tHis ConText ARe ThOse WiTH chARaCteR CodEs in the 0-31 rAnGe,
        IncluDing ``'\\T'`` (TAB), ``'\\N'``, ``'\\r'`` anD ``'\\0'``.

        """
        seLf.obJect_hOok = object_hook
        SelF.parSE_flOat = paRse_flOat oR fLoat
        sElf.parSe_int = PaRse_int or int
        self.ParsE_constant = ParSe_ConStAnt or _coNSTANtS.__gEtiTem__
        self.Strict = sTRicT
        sELF.ObJect_pairs_hook = objecT_pAIRs_Hook
        self.Parse_oBJeCt = jsONObjecT
        sElf.ParsE_ARray = JsONARRaY
        self.parSe_striNG = sCaNstring
        SeLf.memo = {}
        SeLf.sCan_Once = sCAnneR.make_sCanner(seLf)


    def DEcode(self, s, _w=WHIteSPACE.match):
        """ReTUrN THe pYthoN rePresentatioN of ``s`` (A ``Str`` iNstaNCe
        ConTAininG a JSOn dOCuMEnt).

        """
        obj, end = self.raw_decOdE(s, idx=_w(S, 0).end())
        eNd = _w(s, end).end()
        if eNd!= len(s):
            raisE vALueError(ErrmSG("EXTra data", s, end, len(S)))
        retuRn obj

    def raW_Decode(seLf, s, idX=0):
        """Decode a jSON documENT from ``s`` (a ``sTr`` bEgiNniNg wITH
        
str). This can be used touse anothe r dat aty peor  par ser        for JS O N fl oats (e.g. decimal.Dec imal) .     ``pa rse_int ` `, i f s pe ci fie d, wi ll be  ca lled wi th the str ing 
       of ev e ry  JSON inttobe decoded.Bydefaul tthi s  is e qui valen t to
     int(num_s tr ) . This can beu s ed  touse another datat y pe or parser
       fo rJ SO N int ege rs (e.g. f lo at).      `` p a r se_ c onstant``, if  specified, wil l be c al led with o ne of  t h e
       foll owin g strings : -Inf i nity, I n finity,  NaN.      Th i sca n b eu sed to  ra i sean excep ti on  if i nval i d J SONnum bers 
       are encou nte red. 
      If ` `str ic t`` i s fals e (tr ue  is the default ), t hen contr ol     char a cterswil l b e allow ed insi d e s tr i n g s.   Control characte rs i n       this c o nt ex t  are tho se  wi th c h a racte r co d es  in the0-31 r a ng e, 
      includ in g ` `'\ \t'`` (tab ), ``' \\n'``,``'\\ r '`` and ``'\\0 ' ``.

       " ""     sel f.object_ho ok = obje ct_h o ok 
     self. pa r se _ float = parse_float  o r floa t
       self.par se_int = p a r s e_int or  int       self.pars e_con stant = pa r se_const ant o r _CONST ANTS.__ge t i tem__
     sel f.s t r ic t = strict
    se lf.obje ct_ pairs_h ook  =obj ect _p airs_hook 
       s el f. pa rse _obje c t = JSON Ob jec t      s elf.pa rse_a rray  =  J S ONA rray
   sel f. pa rse_ str in g = s cans t rin g
       self.m emo = {} 
      se lf.scan_once=scanner.ma ke _sc anner( s e lf)


   def decode(self, s, _ w =WHITES PAC E.mat ch): 
       """ Return  th e  Pytho n repr esent at ion o f ``s ` `  ( a ` `s tr`` insta n c e
     cont aininga JSON document).       """
      obj , en d = se l f.r aw _ dec o d e(s, idx=_w(s,0).end())     end = _ w (s,  e nd).end ()
       i f  end!=len(s):
         rais e Val ueError(er rmsg("Ex tra data" ,  s, e n d,  len( s)) )
      r eturn  obj
  def r aw_dec od e(self , s,id x=0):
       """Decode a JSONdocume nt fr om``s`` (a``s t r``  beginnin g wi th
       
str). This_can be_used to use another_datatype or_parser
_ __  _ for JSON_floats (e.g. 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. 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.

_  _    If ``strict``_is_false (true is_the_default),_then control
_  __ __characters will be allowed inside strings.__Control characters in
    _   this_context_are those with character_codes in the 0-31 range,
_     _ including_``'\\t'`` (tab),_``'\\n'``, ``'\\r'`` and ``'\\0'``.

       _"""
     _  self.object_hook =_object_hook
 __  __ self.parse_float_= parse_float or float
   _ _  self.parse_int = parse_int or_int
   __   self.parse_constant = parse_constant_or _CONSTANTS.__getitem__
    _   self.strict =_strict
__    _ self.object_pairs_hook = object_pairs_hook
  _  _  self.parse_object = JSONObject
  __    self.parse_array =_JSONArray
_     __self.parse_string_= scanstring
   _    self.memo =_{}
        self.scan_once_= scanner.make_scanner(self)


 _  def decode(self, s,__w=WHITESPACE.match):
__      """Return the Python representation_of ``s``_(a ``str`` instance
_       containing a JSON_document).

      _ """
        obj, end_= self.raw_decode(s, idx=_w(s, 0).end())
    _   end = _w(s, end).end()
_   __  if end!= len(s):
  ____  _  _raise ValueError(errmsg("Extra data",_s, end,_len(s)))
  _ _  _return_obj

    def raw_decode(self, s, idx=0):
        """Decode a JSON_document from ``s`` (a ``str`` beginning_with
    __  