Skip to content

Commit 17c794a

Browse files
author
Noor Dawod
committed
Escape String values.
1 parent ecaecf8 commit 17c794a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +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));
205203
} else {
206-
os.write(value.toString().getBytes());
204+
os.write(escape(value.toString()));
207205
}
208206

209207
os.write(',');

0 commit comments

Comments
 (0)