Denys S.
Denys S.

Reputation: 6525

How to alias object through xstream?

I've got an object which contains list of strings. How is it possible to define that the String.class should be serialized with alias "somealias" instead of "string" through annotations?

Upvotes: 0

Views: 146

Answers (1)

qwerty
qwerty

Reputation: 3869

@XStreamImplicit(itemFieldName="somealias")
private List<String> content;

Upvotes: 1

Related Questions