Qt:QJsonParseError
2021-07-22 01:56
标签:url obj top str nta parser idt json 哪些 QJsonParseError用于JSON解析时报告error。 Qt:QJsonParseError 标签:url obj top str nta parser idt json 哪些 原文地址:https://www.cnblogs.com/ShineLeBlog/p/14966591.html0、说明
1、模块和加载项
Header
#include
qmake
QT += core
Since
Qt 5.0
2、静态字段
类型
字段
取值
说明
enum
ParseError
Constant
Value
Description
QJsonParseError::NoError0No error occurred
QJsonParseError::UnterminatedObject1An object is not correctly terminated with a closing curly bracket
QJsonParseError::MissingNameSeparator2A comma separating different items is missing
QJsonParseError::UnterminatedArray3The array is not correctly terminated with a closing square bracket
QJsonParseError::MissingValueSeparator4A colon separating keys from values inside objects is missing
QJsonParseError::IllegalValue5The value is illegal
QJsonParseError::TerminationByNumber6The input stream ended while parsing a number
QJsonParseError::IllegalNumber7The number is not well formed
QJsonParseError::IllegalEscapeSequence8An illegal escape sequence occurred in the input
QJsonParseError::IllegalUTF8String9An illegal UTF8 sequence occurred in the input
QJsonParseError::UnterminatedString10A string wasn‘t terminated with a quote
QJsonParseError::MissingObject11An object was expected but couldn‘t be found
QJsonParseError::DeepNesting12The JSON document is too deeply nested for the parser to parse it
QJsonParseError::DocumentTooLarge13The JSON document is too large for the parser to parse it
QJsonParseError::GarbageAtEnd14The parsed document contains additional garbage characters at the end
解析时会发生哪些错误
3、实例字段
类型
字段
说明
QJsonParseError::ParseError
error
错误的类型
int
offset
在input string的哪个位置出错
4、实例方法
返回值类型
方法
说明
QString
errorString()
返回错误信息的报告
上一篇:.NET Core 对象池的使用
下一篇:C#中实现可变参数实例
文章标题:Qt:QJsonParseError
文章链接:http://soscw.com/index.php/essay/106830.html