diff --git a/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java b/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java index c1c3e5154..2bad0a4e5 100644 --- a/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java +++ b/src/main/java/net/snowflake/client/jdbc/SnowflakeBaseResultSet.java @@ -1552,8 +1552,11 @@ public Map getMap(int columnIndex, Class type) throws SQLExcep Object object = getObject(columnIndex); Map map; if (object instanceof JsonSqlInput) { + map = new HashMap<>(); JsonNode jsonNode = ((JsonSqlInput) object).getInput(); - map = OBJECT_MAPPER.convertValue(jsonNode, new TypeReference>() {}); + jsonNode + .fieldNames() + .forEachRemaining(node -> map.put(node.toString(), jsonNode.get(node.toString()))); } else { map = (Map) object; } @@ -1565,7 +1568,7 @@ public Map getMap(int columnIndex, Class type) throws SQLExcep if (object instanceof JsonSqlInput) { sqlInput = new JsonSqlInput( - (((JsonSqlInput) object).getInput()).get(entry.getKey()), + (JsonNode) entry.getValue(), session, sfBaseResultSet.getConverters(), sfBaseResultSet