|
|
|
@ -49,7 +49,7 @@ public class BasicJsonParser extends AbstractJsonParser {
|
|
|
|
|
|
|
|
|
|
private List<Object> parseListInternal(String json) {
|
|
|
|
|
List<Object> list = new ArrayList<>();
|
|
|
|
|
json = trimLeadingCharacter(trimTrailingCharacter(json, ']'), '[');
|
|
|
|
|
json = trimLeadingCharacter(trimTrailingCharacter(json, ']'), '[').trim();
|
|
|
|
|
for (String value : tokenize(json)) {
|
|
|
|
|
list.add(parseInternal(value));
|
|
|
|
|
}
|
|
|
|
@ -97,7 +97,7 @@ public class BasicJsonParser extends AbstractJsonParser {
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> parseMapInternal(String json) {
|
|
|
|
|
Map<String, Object> map = new LinkedHashMap<>();
|
|
|
|
|
json = trimLeadingCharacter(trimTrailingCharacter(json, '}'), '{');
|
|
|
|
|
json = trimLeadingCharacter(trimTrailingCharacter(json, '}'), '{').trim();
|
|
|
|
|
for (String pair : tokenize(json)) {
|
|
|
|
|
String[] values = StringUtils.trimArrayElements(StringUtils.split(pair, ":"));
|
|
|
|
|
String key = trimLeadingCharacter(trimTrailingCharacter(values[0], '"'), '"');
|
|
|
|
@ -151,7 +151,7 @@ public class BasicJsonParser extends AbstractJsonParser {
|
|
|
|
|
index++;
|
|
|
|
|
}
|
|
|
|
|
if (build.length() > 0) {
|
|
|
|
|
list.add(build.toString());
|
|
|
|
|
list.add(build.toString().trim());
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|