$67 GRAYBYTE WORDPRESS FILE MANAGER $16

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 93.127.173.80 | ADMIN IP 216.73.216.143
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/simplejson/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/simplejson//errors.py
"""Error classes used by simplejson
"""
__all__ = ['JSONDecodeError']


def linecol(doc, pos):
    lineno = doc.count('\n', 0, pos) + 1
    if lineno == 1:
        colno = pos + 1
    else:
        colno = pos - doc.rindex('\n', 0, pos)
    return lineno, colno


def errmsg(msg, doc, pos, end=None):
    lineno, colno = linecol(doc, pos)
    msg = msg.replace('%r', repr(doc[pos:pos + 1]))
    if end is None:
        fmt = '%s: line %d column %d (char %d)'
        return fmt % (msg, lineno, colno, pos)
    endlineno, endcolno = linecol(doc, end)
    fmt = '%s: line %d column %d - line %d column %d (char %d - %d)'
    return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end)


class JSONDecodeError(ValueError):
    """Subclass of ValueError with the following additional properties:

    msg: The unformatted error message
    doc: The JSON document being parsed
    pos: The start index of doc where parsing failed
    end: The end index of doc where parsing failed (may be None)
    lineno: The line corresponding to pos
    colno: The column corresponding to pos
    endlineno: The line corresponding to end (may be None)
    endcolno: The column corresponding to end (may be None)

    """
    # Note that this exception is used from _speedups
    def __init__(self, msg, doc, pos, end=None):
        ValueError.__init__(self, errmsg(msg, doc, pos, end=end))
        self.msg = msg
        self.doc = doc
        self.pos = pos
        self.end = end
        self.lineno, self.colno = linecol(doc, pos)
        if end is not None:
            self.endlineno, self.endcolno = linecol(doc, end)
        else:
            self.endlineno, self.endcolno = None, None

    def __reduce__(self):
        return self.__class__, (self.msg, self.doc, self.pos, self.end)

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
28 Feb 2025 12.45 AM
root / 996
0755
__pycache__
--
25 Jan 2024 4.25 PM
root / 996
0755
tests
--
25 Jan 2024 4.25 PM
root / 996
0755
__init__.py
23.172 KB
5 Nov 2017 6.28 PM
root / 996
0644
_speedups.cpython-37m-x86_64-linux-gnu.so
56.875 KB
24 Apr 2023 8.32 PM
root / 996
0755
compat.py
0.909 KB
5 Nov 2017 6.28 PM
root / 996
0644
decoder.py
14.244 KB
5 Nov 2017 6.28 PM
root / 996
0644
encoder.py
26.675 KB
5 Nov 2017 6.28 PM
root / 996
0644
errors.py
1.737 KB
5 Nov 2017 6.28 PM
root / 996
0644
ordered_dict.py
2.876 KB
5 Nov 2017 6.28 PM
root / 996
0644
raw_json.py
0.212 KB
5 Nov 2017 6.28 PM
root / 996
0644
scanner.py
2.901 KB
5 Nov 2017 6.28 PM
root / 996
0644
tool.py
1.109 KB
5 Nov 2017 6.28 PM
root / 996
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF