@NotNull
  @Override
  public InputStream toJsonStream(@NotNull Object obj) {
    if (obj instanceof String) {
      String result = (String) obj;
      return new ByteArrayInputStream(result.getBytes());
    } else {
      byte[] string = new byte[0];
      try {
        string = objectMapper.writeValueAsBytes(obj);
        return new ByteArrayInputStream(string);
      } catch (JsonProcessingException e) {
        throw new RuntimeException(e);
      }
    }
  }
Json mapper to adapt shaded jackson.
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/JavalinJsonMapper.java