Closed
Description
(note: replaces #322; possibly addresses #274)
A very common need that is not currently supported is the ability to insert additional properties in JSON (etc) output, without requiring physical POJO properties. This could include things like:
- Injecting Jackson attribute (2.4) values (from Add support for annotation-based integration with attributes (see #319) #322)
- Injecting custom
BeanPropertyWriter
instances (or perhaps a new sub-type), giving more control
Now; although there are some existing annotations that could work her (@JsonSerialize
, specifically, from databidn package), it might make sense to add a new annotation or annotations.
Some things to consider:
- How to specify ordering of these attributes? While
@JsonPropertyOrder
needs to take these into account, it'd make sense to at least specify "default" placement before or after "regular" properties. - For attributes, should name of attribute be 1-to-1 with property name to use? (fine as default, but if/how to allow override?)
- How to minimize amount of annotation decorations to use, without exploding number of annotations; esp. considering need to support (1) and ()
Metadata
Metadata
Assignees
Labels
No labels