I'm using @JSONCreator
and @JsonCreator
to convert a response bean to JSON in Lagom Framework. But, the JSON is not formatted. How can I pretty print the JSON using the annotations (not ObjectMapper)? Here's my sample response bean:
@Immutable
@JsonDeserialize
public class foo {
private final List<Result> _result;
private final MetadataBean _meta;
@JsonCreator
public foo (List<Result> _result, MetadataBean _meta) {
this._result= _result;
this._meta = _meta;
}
}