mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-3519 Added encoding type to prevent encoding errors
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1055126 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -171,7 +171,7 @@ public class JSONUtil {
|
||||
public static Object deserialize(Reader reader) throws JSONException {
|
||||
// read content
|
||||
BufferedReader bufferReader = new BufferedReader(reader);
|
||||
String line = null;
|
||||
String line;
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
try {
|
||||
@@ -234,7 +234,7 @@ public class JSONUtil {
|
||||
InputStream in = null;
|
||||
try {
|
||||
out = new GZIPOutputStream(response.getOutputStream());
|
||||
in = new ByteArrayInputStream(json.getBytes());
|
||||
in = new ByteArrayInputStream(json.getBytes(serializationParams.getEncoding()));
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
while ((len = in.read(buf)) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user