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:
14
14
maven { url "https://jitpack.io" }
15
15
}
16
16
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'
18
18
}
19
19
```
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ dependencies {
32
32
})
33
33
compile ' com.android.support:appcompat-v7:24.2.1'
34
34
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'
36
36
testCompile ' junit:junit:4.12'
37
37
}
38
38
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ public com.github.webee.json.JSONArray newArray() {
15
15
return new JSONArray (new com .alibaba .fastjson .JSONArray ());
16
16
}
17
17
18
+ @ Override
19
+ public Object parse (String text ) {
20
+ return com .alibaba .fastjson .JSON .parse (text );
21
+ }
22
+
18
23
@ Override
19
24
public com .github .webee .json .JSONObject parseObject (String text ) {
20
25
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() {
37
37
38
38
System .out .println (jsonObject .toJSONString ());
39
39
}
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
+ }
40
49
}
You can’t perform that action at this time.
0 commit comments