mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
allow escape inside strings for JSON documents
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
cd5217cdbc
commit
fdfd1a910e
2 changed files with 3 additions and 3 deletions
|
@ -212,8 +212,8 @@ set_package_properties(ZSTD PROPERTIES
|
||||||
TYPE REQUIRED
|
TYPE REQUIRED
|
||||||
)
|
)
|
||||||
|
|
||||||
# v2.0+ required for json_loads() with three arguments
|
# v2.6+ required for JSON_ALLOW_NUL
|
||||||
find_package(Jansson 2.0)
|
find_package(Jansson 2.6)
|
||||||
set_package_properties(Jansson PROPERTIES
|
set_package_properties(Jansson PROPERTIES
|
||||||
PURPOSE "Required for JSON support"
|
PURPOSE "Required for JSON support"
|
||||||
DESCRIPTION "C library for encoding, decoding and manipulating JSON data"
|
DESCRIPTION "C library for encoding, decoding and manipulating JSON data"
|
||||||
|
|
|
@ -51,7 +51,7 @@ QVariantMap QJsonDocumentPrivate::jsonToMap(const QByteArray &jsondata)
|
||||||
}
|
}
|
||||||
|
|
||||||
json_error_t jerror;
|
json_error_t jerror;
|
||||||
json_t *jroot = json_loads(jsondata.constData(), 0, &jerror);
|
json_t *jroot = json_loads(jsondata.constData(), JSON_ALLOW_NUL, &jerror);
|
||||||
|
|
||||||
if (!jroot) {
|
if (!jroot) {
|
||||||
error = jerror.text;
|
error = jerror.text;
|
||||||
|
|
Loading…
Add table
Reference in a new issue