code: public static Object fromURLJavaNet(java.net.URL url) throws JsonParseException, IOException {
          final HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
          urlConn.addRequestProperty("Accept", ACCEPT_HEADER);
  
          final StringWriter output = new StringWriter();
          try (final InputStream directStream = urlConn.getInputStream();) {
              IOUtils.copy(directStream, output, StandardCharsets.UTF_8);
          } finally {
              output.flush();
          }
          final Object context = JsonUtils.fromReader(new StringReader(output.toString()));
          return context;
      }
docs: Fallback method directly using the {@link java.net.HttpURLConnection}
  class for cases where servers do not interoperate correctly with Apache
  HTTPClient.
  
  @param url
  The URL to access.
  @return The result, after conversion from JSON to a Java Object.
  @throws JsonParseException
  If there was a JSON related error during parsing.
  @throws IOException
  If there was an IO error during parsing.