File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed
fastjson-json-api-android
main/java/com/github/webee/fastjson
test/java/com/github/webee/fastjson Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ To install the library add:
1414 maven { url "https://jitpack.io" }
1515 }
1616 dependencies {
17- compile 'com.github.webee:fastjson-json-api-android:v1.0 .0'
17+ compile 'com.github.webee:fastjson-json-api-android:v1.1 .0'
1818 }
1919 ```
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ dependencies {
3232 })
3333 compile ' com.android.support:appcompat-v7:24.2.1'
3434 compile ' com.alibaba:fastjson:1.1.55.android'
35- compile ' com.github.webee:java-json-api:v1.0 .0'
35+ compile ' com.github.webee:java-json-api:v1.1 .0'
3636 testCompile ' junit:junit:4.12'
3737}
3838
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ public com.github.webee.json.JSONArray newArray() {
1515 return new JSONArray (new com .alibaba .fastjson .JSONArray ());
1616 }
1717
18+ @ Override
19+ public Object parse (String text ) {
20+ return com .alibaba .fastjson .JSON .parse (text );
21+ }
22+
1823 @ Override
1924 public com .github .webee .json .JSONObject parseObject (String text ) {
2025 return new JSONObject (com .alibaba .fastjson .JSON .parseObject (text ));
Original file line number Diff line number Diff line change @@ -37,4 +37,13 @@ public void testDecoding() {
3737
3838 System .out .println (jsonObject .toJSONString ());
3939 }
40+
41+ @ Test
42+ public void test () {
43+ JSON json = new fastjsonJSON ();
44+ JSONObject jsonObject = json .newObject ();
45+
46+ jsonObject .set ("key" , "中国\uD83D \uDE00 " );
47+ System .out .println (jsonObject .toJSONString ());
48+ }
4049}
You can’t perform that action at this time.
0 commit comments