Hello,
I am turning a corner in my JSON parser. I support ASCII through and
through, but now I want to support Unicode, apparently UTF-8, part of
the JSON standard. From what I can tell, this is not the entire
grammar, but just for Strings.
Looking for a little guidance on how to approach that issue, the
elements involved, etc. Such as, are we talking about C++
std::wstring? I have also seen std::u32string referenced in some
forums.
To begin with, it is a somewhat naive impression, would the characters
not translate to unsigned char or char, but rather to
std::wstring::value_type or std::u32string::value_type? Things like
that come to mind approaching the issue.
Additionally, how to otherwise handle symbol tables such as escape
characters, i.e. from:
struct escapes_t : qi::symbols<char, char> {
escapes_t() {
this->add("\\b", '\b')
("\\f", '\f')
("\\n", '\n')
("\\r", '\r')
("\\t", '\t')
("\\v", '\v')
("\\\\", '\\')
("\\/", '/')
("\\'", '\'')
("\\\"", '"')
;
}
} char_esc;
And on from there.
Thanks!
Best regards,
Michael W Powell
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users