Skip to content

Commit 9b20fec

Browse files
committed
add put(key, JSONObject) to JSONBuilder
1 parent 1a44d41 commit 9b20fec

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

custom/src/main/java/com/isolpro/custom/JSONBuilder.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,39 @@ public JSONBuilder put(String key, String value, boolean toPut) {
4040
}
4141

4242
public JSONBuilder put(String key, String value) {
43-
return putHandled(key, value, true);
43+
return put(key, value, true);
4444
}
4545

4646
public JSONBuilder put(String key, int value, boolean toPut) {
4747
return putHandled(key, value, toPut);
4848
}
4949

5050
public JSONBuilder put(String key, int value) {
51-
return putHandled(key, value, true);
51+
return put(key, value, true);
5252
}
5353

5454
public JSONBuilder put(String key, float value, boolean toPut) {
5555
return putHandled(key, value, toPut);
5656
}
5757

5858
public JSONBuilder put(String key, float value) {
59-
return putHandled(key, value, true);
59+
return put(key, value, true);
6060
}
6161

6262
public JSONBuilder put(String key, boolean value, boolean toPut) {
6363
return putHandled(key, value, toPut);
6464
}
6565

6666
public JSONBuilder put(String key, boolean value) {
67-
return putHandled(key, value, true);
67+
return put(key, value, true);
68+
}
69+
70+
public JSONBuilder put(String key, JSONObject jsonObject, boolean toPut) {
71+
return putHandled(key, jsonObject, toPut);
72+
}
73+
74+
public JSONBuilder put(String key, JSONObject jsonObject) {
75+
return put(key, jsonObject, true);
6876
}
6977

7078
public JSONObject build() {

0 commit comments

Comments
 (0)