KalleOlaviNiemitalo commented on code in PR #2831:
URL: https://github.com/apache/avro/pull/2831#discussion_r1547468328
##########
lang/c++/impl/json/JsonIO.cc:
##########
@@ -314,11 +314,37 @@ JsonParser::Token JsonParser::tryString() {
}
}
+static string::const_iterator unicodeParse(string::const_iterator b,
string::const_iterator e, uint32_t &n) {
+ string::const_iterator start = b;
+ for (int i = 0; i < 4; i++) {
+ ++b;
+ if (b == e) {
+ throw Exception(boost::format(
+ "Invalid unicode escape: %1%") % string(start,
b));
Review Comment:
`string(start, b)` seems to be formatted like `u123`. Should the exception
message include the backslash as in `\u123`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]