File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
fastjson-json-api-android
src/main/java/com/github/webee/fastjson Expand file tree Collapse file tree 3 files changed +15
-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.1 .0'
17
+ compile 'com.github.webee:fastjson-json-api-android:v1.2 .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.1 .0'
35
+ compile ' com.github.webee:java-json-api:v1.2 .0'
36
36
testCompile ' junit:junit:4.12'
37
37
}
38
38
Original file line number Diff line number Diff line change 1
1
package com .github .webee .fastjson ;
2
2
3
+ import java .util .Arrays ;
4
+ import java .util .Map ;
5
+
3
6
/**
4
7
* Created by webee on 16/11/25.
5
8
*/
@@ -10,11 +13,21 @@ public com.github.webee.json.JSONObject newObject() {
10
13
return new JSONObject (new com .alibaba .fastjson .JSONObject ());
11
14
}
12
15
16
+ @ Override
17
+ public com .github .webee .json .JSONObject newObject (Map <String , Object > map ) {
18
+ return new JSONObject (new com .alibaba .fastjson .JSONObject (map ));
19
+ }
20
+
13
21
@ Override
14
22
public com .github .webee .json .JSONArray newArray () {
15
23
return new JSONArray (new com .alibaba .fastjson .JSONArray ());
16
24
}
17
25
26
+ @ Override
27
+ public com .github .webee .json .JSONArray newArray (Object [] array ) {
28
+ return new JSONArray (new com .alibaba .fastjson .JSONArray (Arrays .asList (array )));
29
+ }
30
+
18
31
@ Override
19
32
public Object parse (String text ) {
20
33
return com .alibaba .fastjson .JSON .parse (text );
You can’t perform that action at this time.
0 commit comments