@JsonIgnore @SerializeIgnore public GeneralDatumMetadata getMeta() { if (meta == null && metaJson != null) { meta = DatumUtils.getObjectFromJSON(metaJson, GeneralDatumMetadata.class); metaJson = null; // clear this out, because we might mutate meta and invalidate our cached JSON value } return meta; }
@JsonIgnore @SerializeIgnore public String getMetaJson() { if (metaJson == null) { metaJson = DatumUtils.getJSONString(meta, "{}"); meta = null; // clear this out, because we might otherwise mutate it and invalidate our cached // JSON value } return metaJson; }