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:
1414 maven { url "https://jitpack.io" }
1515 }
1616 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'
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.1 .0'
35+ compile ' com.github.webee:java-json-api:v1.2 .0'
3636 testCompile ' junit:junit:4.12'
3737}
3838
Original file line number Diff line number Diff line change 11package com .github .webee .fastjson ;
22
3+ import java .util .Arrays ;
4+ import java .util .Map ;
5+
36/**
47 * Created by webee on 16/11/25.
58 */
@@ -10,11 +13,21 @@ public com.github.webee.json.JSONObject newObject() {
1013 return new JSONObject (new com .alibaba .fastjson .JSONObject ());
1114 }
1215
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+
1321 @ Override
1422 public com .github .webee .json .JSONArray newArray () {
1523 return new JSONArray (new com .alibaba .fastjson .JSONArray ());
1624 }
1725
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+
1831 @ Override
1932 public Object parse (String text ) {
2033 return com .alibaba .fastjson .JSON .parse (text );
You can’t perform that action at this time.
0 commit comments