|
|
@ -195,10 +195,10 @@ public class JsonUtils {
|
|
|
|
for (Object key : json.keySet()) {
|
|
|
|
for (Object key : json.keySet()) {
|
|
|
|
Object value = json.get(key);
|
|
|
|
Object value = json.get(key);
|
|
|
|
|
|
|
|
|
|
|
|
if (value instanceof JSONObject)
|
|
|
|
if (value instanceof JSONObject jo)
|
|
|
|
extractJsonKeyValue((JSONObject)value, keyName, valueName);
|
|
|
|
extractJsonKeyValue(jo, keyName, valueName);
|
|
|
|
else if (value instanceof JSONArray)
|
|
|
|
else if (value instanceof JSONArray ja)
|
|
|
|
((JSONArray)value).forEach(obj -> extractJsonKeyValue((JSONObject)obj, keyName, valueName));
|
|
|
|
ja.forEach(obj -> extractJsonKeyValue((JSONObject)obj, keyName, valueName));
|
|
|
|
else{
|
|
|
|
else{
|
|
|
|
//System.out.println(key + ", " + value);
|
|
|
|
//System.out.println(key + ", " + value);
|
|
|
|
keys.add(String.valueOf(key));
|
|
|
|
keys.add(String.valueOf(key));
|
|
|
@ -238,10 +238,10 @@ public class JsonUtils {
|
|
|
|
for (Object key : json.keySet()) {
|
|
|
|
for (Object key : json.keySet()) {
|
|
|
|
Object value = json.get(key);
|
|
|
|
Object value = json.get(key);
|
|
|
|
|
|
|
|
|
|
|
|
if (value instanceof JSONObject)
|
|
|
|
if (value instanceof JSONObject jo)
|
|
|
|
extractJsonKeyValue((JSONObject)value, keyName, valueName);
|
|
|
|
extractJsonKeyValue(jo, keyName, valueName);
|
|
|
|
else if (value instanceof JSONArray)
|
|
|
|
else if (value instanceof JSONArray ja)
|
|
|
|
((JSONArray)value).forEach(obj -> extractJsonKeyValue((JSONObject)obj, keyName, valueName));
|
|
|
|
ja.forEach(obj -> extractJsonKeyValue((JSONObject)obj, keyName, valueName));
|
|
|
|
else{
|
|
|
|
else{
|
|
|
|
//System.out.println(key + ", " + value);
|
|
|
|
//System.out.println(key + ", " + value);
|
|
|
|
keys.add(String.valueOf(key));
|
|
|
|
keys.add(String.valueOf(key));
|
|
|
|