Skip to content

Commit 551c1b3

Browse files
committed
Fix json array reading issue
1 parent 172dc33 commit 551c1b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/kodedu/other/JsonHelper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
public class JsonHelper {
88
public static JsonArray getJsonArrayOrEmpty(JsonObject jsonObject, String key) {
99

10-
if (jsonObject.containsKey(key) && jsonObject.getValueType() == JsonValue.ValueType.ARRAY) {
10+
if (jsonObject.containsKey(key) && jsonObject.get(key).getValueType() == JsonValue.ValueType.ARRAY) {
1111
return jsonObject.getJsonArray(key);
1212
}
1313
return JsonValue.EMPTY_JSON_ARRAY;

0 commit comments

Comments
 (0)