Skip to content

Commit ecaecf8

Browse files
author
Noor Dawod
committed
Merge pull request android-async-http#660 from wada811/master
Escape json string value
2 parents 05279f3 + dd43e27 commit ecaecf8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ public void writeTo(final OutputStream out) throws IOException {
200200
os.write((((Number) value).floatValue() + "").getBytes());
201201
} else if (value instanceof Integer) {
202202
os.write((((Number) value).intValue() + "").getBytes());
203+
} else if (value instanceof String) {
204+
os.write(escape(value));
203205
} else {
204206
os.write(value.toString().getBytes());
205207
}

0 commit comments

Comments
 (0)