code: @Override
    public Properties getProperties(InputStream inputStream) {
      requireNonNull(inputStream);
  
      Properties properties = new Properties();
  
      try {
  
        JSONTokener tokener = new JSONTokener(inputStream);
        if (tokener.end()) {
          return properties;
        }
        if (tokener.nextClean() == '"') {
          tokener.back();
          properties.put("content", tokener.nextValue().toString());
        } else {
          tokener.back();
          JSONObject obj = new JSONObject(tokener);
  
          Map<String, Object> yamlAsMap = convertToMap(obj);
          properties.putAll(flatten(yamlAsMap));
        }
  
        return properties;
  
      } catch (Exception e) {
        throw new IllegalStateException("Unable to load json configuration from provided stream", e);
      }
    }
docs: Get {@link Properties} for a given {@code inputStream} treating it as a JSON file.
  
  @param inputStream input stream representing JSON file
  @return properties representing values from {@code inputStream}
  @throws IllegalStateException when unable to read properties