private static ObjectNode objectNodeFromParser(
      final JsonParser baseParser, final boolean allowComments, final String... excludeFields) {
    try {
      final var parser =
          excludeFields.length > 0
              ? new FilteringParserDelegate(
                  baseParser,
                  new NameExcludeFilter(excludeFields),
                  TokenFilter.Inclusion.INCLUDE_ALL_AND_PATH,
                  true)
              : baseParser;
      parser.configure(Feature.ALLOW_COMMENTS, allowComments);

      final ObjectMapper objectMapper = new ObjectMapper();
      final JsonNode jsonNode = objectMapper.readTree(parser);
      validateType(jsonNode, JsonNodeType.OBJECT);
      return (ObjectNode) jsonNode;
    } catch (final IOException e) {
      throw new RuntimeException(e);
    }
  }
Get a JsonParser to parse JSON from URL.

@param jsonSource the json source
@param allowComments true to allow comments
@return the json parser
config/src/main/java/org/hyperledger/besu/config/JsonUtil.java