### Question:
JsonUtil { public static ObjectNode normalizeKeys(final ObjectNode objectNode) { final ObjectNode normalized = JsonUtil.createEmptyObjectNode(); objectNode .fields() .forEachRemaining( entry -> { final String key = entry.getKey(); final JsonNode value = entry.getValue(); final String normalizedKey = key.toLowerCase(Locale.US); if (value instanceof ObjectNode) { normalized.set(normalizedKey, normalizeKeys((ObjectNode) value)); } else { normalized.set(normalizedKey, value); } }); return normalized; }  static ObjectNode normalizeKeys(final ObjectNode objectNode); static Optional<String> getValueAsString(final ObjectNode node, final String key); static String getValueAsString(
      final ObjectNode node, final String key, final String defaultValue); static Optional<String> getString(final ObjectNode node, final String key); static String getString(
      final ObjectNode node, final String key, final String defaultValue); static OptionalInt getInt(final ObjectNode node, final String key); static int getInt(final ObjectNode node, final String key, final int defaultValue); static OptionalLong getLong(final ObjectNode json, final String key); static long getLong(final ObjectNode json, final String key, final long defaultValue); static Optional<Boolean> getBoolean(final ObjectNode node, final String key); static boolean getBoolean(
      final ObjectNode node, final String key, final boolean defaultValue); static ObjectNode createEmptyObjectNode(); static ObjectNode objectNodeFromMap(final Map<String, Object> map); static ObjectNode objectNodeFromString(final String jsonData); static ObjectNode objectNodeFromString(
      final String jsonData, final boolean allowComments); static String getJson(final Object objectNode); static String getJson(final Object objectNode, final boolean prettyPrint); static ObjectMapper getObjectMapper(); static Optional<ObjectNode> getObjectNode(final ObjectNode json, final String fieldKey); static Optional<ObjectNode> getObjectNode(
      final ObjectNode json, final String fieldKey, final boolean strict); static Optional<ArrayNode> getArrayNode(final ObjectNode json, final String fieldKey); static Optional<ArrayNode> getArrayNode(
      final ObjectNode json, final String fieldKey, final boolean strict);  }### Answer:
@Test public void normalizeKeys_cases() { final List<String> cases = List.of( "lower", "CAPS", "Proper", "camelCase", "snake_case", "SHOUT_CASE", "dash-case", "!@#$%^&*(){}[]\\|-=_+;':\",.<>/?`~"); final ObjectNode base = mapper.createObjectNode(); for (final String s : cases) { base.put(s, s); } final ObjectNode normalized = JsonUtil.normalizeKeys(base); for (final String s : cases) { assertThat(base.get(s).asText()).isEqualTo(normalized.get(s.toLowerCase(Locale.US)).asText()); } }
@Test public void normalizeKeys_depth() { final ObjectNode base = mapper.createObjectNode(); base.putObject("DEEP").putObject("deeper").put("deeperER", "DEEPEST"); final ObjectNode normalized = JsonUtil.normalizeKeys(base); assertThat(base.get("DEEP").get("deeper").get("deeperER").asText()) .isEqualTo(normalized.get("deep").get("deeper").get("deeperer").asText()); }