QJsonParseError — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtCore.QJsonParseError

Description

TODO

Enums

ParseError

This enum describes the type of error that occurred during the parsing of a JSON document.

Member Value Description
DeepNesting 12 The JSON document is too deeply nested for the parser to parse it
DocumentTooLarge 13 The JSON document is too large for the parser to parse it
GarbageAtEnd 14 The parsed document contains additional garbage characters at the end
IllegalEscapeSequence 8 An illegal escape sequence occurred in the input
IllegalNumber 7 The number is not well formed
IllegalUTF8String 9 An illegal UTF8 sequence occurred in the input
IllegalValue 5 The value is illegal
MissingNameSeparator 2 A comma separating different items is missing
MissingObject 11 An object was expected but couldn’t be found
MissingValueSeparator 4 A colon separating keys from values inside objects is missing
NoError 0 No error occurred
TerminationByNumber 6 The input stream ended while parsing a number (as of 6.9, this is no longer returned)
UnterminatedArray 3 The array is not correctly terminated with a closing square bracket
UnterminatedObject 1 An object is not correctly terminated with a closing curly bracket
UnterminatedString 10 A string wasn’t terminated with a quote

Attributes

error: ParseError

Contains the type of the parse error. Is equal to NoError if the document was parsed correctly.

See also

ParseError, errorString().


offset: int

Contains the byte offset in the UTF-8 byte array where the parse error occurred.

Methods

__init__()

TODO


__init__(QJsonParseError)

TODO


errorString() → str

Returns the human-readable message appropriate to the reported JSON parsing error.