Fixing a bug with truncated lone string responses

This commit is contained in:
Andrew B 2015-08-06 16:54:24 -07:00
parent 1007534575
commit d5b959d8cd

View File

@ -356,7 +356,7 @@ public class ApiClient {
} }
else if(String.class.equals(cls)) { else if(String.class.equals(cls)) {
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1) if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
return json.substring(1, json.length() - 2); return json.substring(1, json.length() - 1);
else else
return json; return json;
} }