use of com.fasterxml.jackson.annotation.JsonRawValue in project ma-modules-public by infiniteautomation.
the class AuditEventInstanceModel method getContext.
@JsonRawValue
public String getContext() {
// Since the JsonData table can contain JSON within the context, return raw JSON all the time here
StringWriter stringWriter = new StringWriter();
JsonWriter writer = new JsonWriter(Common.JSON_CONTEXT, stringWriter);
writer.setPrettyIndent(3);
writer.setPrettyOutput(true);
try {
writer.writeObject(this.data.getContext());
return stringWriter.toString();
} catch (JsonException e) {
throw new ShouldNeverHappenException(e);
} catch (IOException e) {
throw new ShouldNeverHappenException(e);
}
}
Aggregations