public static Boolean getBoolean(JsonNode jsonNode, String fieldName, boolean defaultValue) {
    Preconditions.checkNotNull(jsonNode, "JsonNode should not be null.");
    JsonNode value = jsonNode.get(fieldName);
    if (value == null) {
      return defaultValue;
    }

    if (value.isBoolean()) {
      return value.booleanValue();
    }
    throw new ClassCastException("can not cast to bool, value : " + value);
  }
Convert an java object(usually java bean) to JsonNode.
amoro-common/src/main/java/org/apache/amoro/utils/JacksonUtil.java