code: public static GitkitClient createFromJson(String configPath, Proxy proxy)
        throws GitkitClientException, JSONException, IOException {
      JSONObject configData =
          new JSONObject(
              StandardCharsets.UTF_8.decode(
                  ByteBuffer.wrap(Files.readAllBytes(Paths.get(configPath))))
                  .toString());
      if (!configData.has("clientId") && !configData.has("projectId")) {
        throw new GitkitClientException("Missing projectId or clientId in server configuration.");
      }
      return new GitkitClient.Builder()
           .setProxy(proxy)
           .setGoogleClientId(configData.optString("clientId", null))
           .setProjectId(configData.optString("projectId", null))
           .setServiceAccountEmail(configData.optString("serviceAccountEmail", null))
           .setKeyStream(configData.has("serviceAccountPrivateKeyFile")
                ? new FileInputStream(configData.getString("serviceAccountPrivateKeyFile"))
                : null)
           .setWidgetUrl(configData.optString("widgetUrl", null))
           .setCookieName(configData.optString("cookieName", "gtoken"))
           .build();
    }
docs: Constructs a Gitkit client from a JSON config file
  
  @param configPath Path to JSON configuration file
  @param proxy the Proxy object to use when using Gitkit client behind a proxy
  @return Gitkit client