This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Description
Atm QJSON returns error for UTF with BOM encoded strings. QJsonDocument from Qt5 can handle with it. Qt5 has internal function
void Parser::eatBOM()
{
// eat UTF-8 byte order mark
uchar utf8bom[3] = { 0xef, 0xbb, 0xbf };
if (end - json > 3 &&
(uchar)json[0] == utf8bom[0] &&
(uchar)json[1] == utf8bom[1] &&
(uchar)json[2] == utf8bom[2])
json += 3;
}
So JSON is good for Qt5 can be bad for QJSON.