aboutsummaryrefslogtreecommitdiff
path: root/common/json.h
diff options
context:
space:
mode:
authorThierry Crozat2019-09-20 01:11:06 +0100
committerFilippos Karapetis2019-09-21 22:15:26 +0300
commitbdd7b6baedea7455fdc1754f7c7b49fef201cc2a (patch)
tree711ba0c9d2711b22f563d91af92dd5423a460996 /common/json.h
parentcaf096807895d30983c649e4218033fa3abccbfa (diff)
downloadscummvm-rg350-bdd7b6baedea7455fdc1754f7c7b49fef201cc2a.tar.gz
scummvm-rg350-bdd7b6baedea7455fdc1754f7c7b49fef201cc2a.tar.bz2
scummvm-rg350-bdd7b6baedea7455fdc1754f7c7b49fef201cc2a.zip
COMMON: Fix escaping and parsing of UTF-8 strings in JASON parser
Diffstat (limited to 'common/json.h')
-rw-r--r--common/json.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/json.h b/common/json.h
index a911196d18..c1e630ca32 100644
--- a/common/json.h
+++ b/common/json.h
@@ -130,6 +130,8 @@ protected:
private:
static String stringifyString(const String &str);
+ static uint32 decodeUtf8Char(String::const_iterator &begin, const String::const_iterator &end);
+ static uint8 decodeUtf8Byte(uint8 state, uint32 &codepoint, uint8 byte);
String stringifyImpl(size_t const indentDepth) const;
static String indent(size_t depth);
@@ -155,6 +157,7 @@ public:
protected:
static bool skipWhitespace(const char **data);
static bool extractString(const char **data, String &str);
+ static uint32 parseUnicode(const char **data);
static double parseInt(const char **data);
static double parseDecimal(const char **data);
private: