{title:'@Json Annotation'}
The {@link oaj.json.annotation.Json @Json} annotation is used to override the behavior of {@link oaj.json.JsonSerializer} on individual bean classes or properties.
The annotation can be applied to beans as well as other objects serialized to other types (e.g. strings).
The {@link oaj.json.annotation.Json#wrapperAttr() @Json(wrapperAttr)} annotation can be used to wrap beans inside a JSON object with a specified attribute name.
|
The following shows the JSON representation with and without the annotation present:
Without annotation | With annotation |
---|---|
| {
| |
| {
| |