Skip to content

Commit e53b688

Browse files
author
Noor Dawod
committed
Check for internal org.json.JSON* classes when sending content.
1 parent b212512 commit e53b688

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/src/main/java/com/loopj/android/http/JsonStreamerEntity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ public void writeTo(final OutputStream out) throws IOException {
192192
os.write('}');
193193
} else if (value instanceof JsonValueInterface) {
194194
os.write(((JsonValueInterface) value).getEscapedJsonValue());
195+
} else if (value instanceof org.json.JSONObject) {
196+
os.write(((org.json.JSONObject) value).toString().getBytes());
197+
} else if (value instanceof org.json.JSONArray) {
198+
os.write(((org.json.JSONArray) value).toString().getBytes());
195199
} else if (value instanceof Boolean) {
196200
os.write((Boolean) value ? JSON_TRUE : JSON_FALSE);
197201
} else if (value instanceof Long) {

0 commit comments

Comments
 (0)