mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-02 08:21:46 +00:00
Merge pull request #31 from outersky/master
Json parser now supports unicode escape sequence
This commit is contained in:
commit
7cd71559b6
2 files changed
+13
No files matched your search
@@ -151,6 +151,15 @@ public class ReadBasicJsonContext implements ReadJsonInterface {
|
||||
case '"':
|
||||
sb.append('"');
|
||||
break;
|
||||
case 'u':
|
||||
String msg = "EOF reading unicode value";
|
||||
char c1 = src.nextChar(msg);
|
||||
char c2 = src.nextChar(msg);
|
||||
char c3 = src.nextChar(msg);
|
||||
char c4 = src.nextChar(msg);
|
||||
char u = (char) Integer.parseInt(""+c1+c2+c3+c4, 16);
|
||||
sb.append(u);
|
||||
break;
|
||||
|
||||
default:
|
||||
sb.append('\\');
|
||||
|
||||
Reference in new issue
Block a user