private static boolean validateType(final JsonNode node, final JsonNodeType expectedType) {
    if (node.getNodeType() != expectedType) {
      final String errorMessage =
          String.format(
              "Expected %s value but got %s",
              expectedType.toString().toLowerCase(Locale.ROOT),
              node.getNodeType().toString().toLowerCase(Locale.ROOT));
      throw new IllegalArgumentException(errorMessage);
    }
    return true;
  }
Gets array node.

@param json the json
@param fieldKey the field key
@param strict true for strict mode
@return the array node
config/src/main/java/org/hyperledger/besu/config/JsonUtil.java