Aestate
Classes | Functions | Variables
aestate.ajson.sim.decoder Namespace Reference

Classes

class  JSONDecoder
 

Functions

def _import_c_scanstring ()
 
def _floatconstants ()
 
def py_scanstring (s, end, encoding=None, strict=True, _b=BACKSLASH, _m=STRINGCHUNK.match, _join=u''.join, _PY3=PY3, _maxunicode=sys.maxunicode)
 
def JSONObject (state, encoding, strict, scan_once, object_hook, object_pairs_hook, memo=None, _w=WHITESPACE.match, _ws=WHITESPACE_STR)
 
def JSONArray (state, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR)
 

Variables

def c_scanstring = _import_c_scanstring()
 
list __all__ = ['JSONDecoder']
 
 FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
 
dictionary _CONSTANTS
 
 STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS)
 
dictionary BACKSLASH
 
string DEFAULT_ENCODING = "utf-8"
 
def scanstring = c_scanstring or py_scanstring
 
 WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS)
 
string WHITESPACE_STR = ' \t\n\r'
 

Detailed Description

Implementation of JSONDecoder

Function Documentation

◆ _floatconstants()

def aestate.ajson.sim.decoder._floatconstants ( )
private

Definition at line 28 of file decoder.py.

◆ _import_c_scanstring()

def aestate.ajson.sim.decoder._import_c_scanstring ( )
private

Definition at line 11 of file decoder.py.

◆ JSONArray()

def aestate.ajson.sim.decoder.JSONArray (   state,
  scan_once,
  _w = WHITESPACE.match,
  _ws = WHITESPACE_STR 
)

Definition at line 244 of file decoder.py.

◆ JSONObject()

def aestate.ajson.sim.decoder.JSONObject (   state,
  encoding,
  strict,
  scan_once,
  object_hook,
  object_pairs_hook,
  memo = None,
  _w = WHITESPACE.match,
  _ws = WHITESPACE_STR 
)

Definition at line 149 of file decoder.py.

◆ py_scanstring()

def aestate.ajson.sim.decoder.py_scanstring (   s,
  end,
  encoding = None,
  strict = True,
  _b = BACKSLASH,
  _m = STRINGCHUNK.match,
  _join = u''.join,
  _PY3 = PY3,
  _maxunicode = sys.maxunicode 
)
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.

Definition at line 55 of file decoder.py.

Variable Documentation

◆ __all__

list aestate.ajson.sim.decoder.__all__ = ['JSONDecoder']
private

Definition at line 23 of file decoder.py.

◆ _CONSTANTS

dictionary aestate.ajson.sim.decoder._CONSTANTS
private
Initial value:
1 = {
2  '-Infinity': NegInf,
3  'Infinity': PosInf,
4  'NaN': NaN,
5 }

Definition at line 40 of file decoder.py.

◆ BACKSLASH

dictionary aestate.ajson.sim.decoder.BACKSLASH
Initial value:
1 = {
2  '"': u'"', '\\': u'\\', '/': u'/',
3  'b': u'\b', 'f': u'\f', 'n': u'\n', 'r': u'\r', 't': u'\t',
4 }

Definition at line 47 of file decoder.py.

◆ c_scanstring

def aestate.ajson.sim.decoder.c_scanstring = _import_c_scanstring()

Definition at line 19 of file decoder.py.

◆ DEFAULT_ENCODING

string aestate.ajson.sim.decoder.DEFAULT_ENCODING = "utf-8"

Definition at line 52 of file decoder.py.

◆ FLAGS

aestate.ajson.sim.decoder.FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL

Definition at line 25 of file decoder.py.

◆ scanstring

def aestate.ajson.sim.decoder.scanstring = c_scanstring or py_scanstring

Definition at line 143 of file decoder.py.

◆ STRINGCHUNK

aestate.ajson.sim.decoder.STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS)

Definition at line 46 of file decoder.py.

◆ WHITESPACE

aestate.ajson.sim.decoder.WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS)

Definition at line 145 of file decoder.py.

◆ WHITESPACE_STR

string aestate.ajson.sim.decoder.WHITESPACE_STR = ' \t\n\r'

Definition at line 146 of file decoder.py.