Closed ghost closed 12 years ago
Ok, would you indicate like this:
public class Personel extends BaseEntity {
@JsonIgnoreProperties({ "parent" })
public Location location;
}
name @JsonIgnoreProperties could work, since such annotation already exists, but currently can only be used for class. But this could be changed to allow use for properties as well.
Oh. And even better, as per this Jira entry (https://jira.codehaus.org/browse/JACKSON-787), this was implemented for Jackson 2.0.0! So you can just use @JsonIgnoreProperties
on fields or getter/setters.
So if I understood your request correctly, this already works.
i using jackson with spring 3.1.1 but i think jackson 2 not support in this spring version plz help me how can solve my problem this is critical for me
The only solution I can think of for Jackson 1.x is to write a custom serializer.
how can do it plz help can you give me one samples plz help me
I would suggest you read a FAQ on issue trackers: these are NOT help forums, but for reporting bugs or requesting features. Help forums are different. Please subscribe to a user list or go to http://jackson-users.ning.com.
And surely you can use google to find documentation, either by yourself, or via help forums.
thanks another question how can i get just property that want not say @JsonIgnoreProperties like @JsonProperties({'id','firstname'})
i have a [personel] model like this that have [location] property i want to ignore [parent] property in Location just for this use not for all time i want to ignore [parent] property in location just in Personel model
is annotation like @ignoreproperty("perent") in property level not in class level