mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 07:14:46 +02:00
Stricter JSON standard conformance (#2153)
This commit is contained in:

committed by
Alex Fabijanic

parent
bdd0478ead
commit
2632f34e85
@@ -57,13 +57,17 @@ struct Foundation_API UTF8
|
||||
/// Remove the UTF-8 Byte Order Mark sequence (0xEF, 0xBB, 0xBF)
|
||||
/// from the beginning of the string, if it's there.
|
||||
|
||||
static std::string escape(const std::string& s);
|
||||
static std::string escape(const std::string& s, bool strictJSON = false);
|
||||
/// Escapes a string. Special characters like tab, backslash, ... are
|
||||
/// escaped. Unicode characters are escaped to \uxxxx.
|
||||
/// If strictJSON is true, \a and \v will be escaped to \\u0007 and \\u000B
|
||||
/// instead of \\a and \\v for strict JSON conformance.
|
||||
|
||||
static std::string escape(const std::string::const_iterator& begin, const std::string::const_iterator& end);
|
||||
static std::string escape(const std::string::const_iterator& begin, const std::string::const_iterator& end, bool strictJSON = false);
|
||||
/// Escapes a string. Special characters like tab, backslash, ... are
|
||||
/// escaped. Unicode characters are escaped to \uxxxx.
|
||||
/// If strictJSON is true, \a and \v will be escaped to \\u0007 and \\u000B
|
||||
/// instead of \\a and \\v for strict JSON conformance.
|
||||
|
||||
static std::string unescape(const std::string& s);
|
||||
/// Creates an UTF8 string from a string that contains escaped characters.
|
||||
|
Reference in New Issue
Block a user