diff options
author | Thierry Crozat | 2019-09-20 01:11:06 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-09-21 22:15:26 +0300 |
commit | bdd7b6baedea7455fdc1754f7c7b49fef201cc2a (patch) | |
tree | 711ba0c9d2711b22f563d91af92dd5423a460996 /common/json.h | |
parent | caf096807895d30983c649e4218033fa3abccbfa (diff) | |
download | scummvm-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.h | 3 |
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: |