FasterXML / FasterXML/jackson-future-ideas

Rename a @JsonProperty only inside a @JsonView

Open
#22 0 comments 11 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
21
Forks
3
PR merge metrics
No merged PRs in 30d

Description

It would be handy if one could rename a json property **only** inside a specific view.

```
public class PersonDTO {
@JsonView(View.Specific.class)
private String personname;

static class View {
interface Specific {
//@JsonProperty("firstname") //TODO this does not work
private String personname;
}
}
}
```

Here, default field name is "personname", but when using the view explicit, the field should only then be renamed to "firstname".

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.