You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it's not possible to serialize the property of an object specifying a Json view. Please create a new @JsonUseView annotation to be able to specify a view used to serialize the property.
public class Company {
@JsonView(View.Basic.class)
private Long id;
@JsonView(View.Basic.class)
private String name;
private String extraData;
private String sensitiveData;
private String privateData;
...
}
public class User{
private Long id;
private String name;
@UseJsonView(View.Basic.class)
private Company company;
...
}
Or create a new set of annotations that allow this feature. For example:
@JsonViews(views={
@View(name="basic", fields=["id", "name"]),
@View(name="otherView", fields=["id", "name", "extraData"]),
})
public class Company {
private Long id;
private String name;
private String extraData;
private String sensitiveData;
private String privateData;
...
}
public class User{
private Long id;
private String name;
@UseJsonView("basic")
private Company company;
...
}
The text was updated successfully, but these errors were encountered:
ccasallas
changed the title
FEATURE: Enable to serialize a property using Json views feature
FEATURE: Allow to specify a Json View to serialize a property
Mar 27, 2018
ccasallas
changed the title
FEATURE: Allow to specify a Json View to serialize a property
FEATURE: Allow to specify a Json View to serialize a property of a object
Mar 27, 2018
ccasallas
changed the title
FEATURE: Allow to specify a Json View to serialize a property of a object
FEATURE: Allow to specify a Json View to serialize a property of an object
Mar 27, 2018
Currently it's not possible to serialize the property of an object specifying a Json view. Please create a new
@JsonUseView
annotation to be able to specify a view used to serialize the property.Or create a new set of annotations that allow this feature. For example:
The text was updated successfully, but these errors were encountered: