How to prevent XStream from displaying class = "string"?
1 answer
Missing fields
For proper deserialization, XStream must write the complete graph of the object in XML, referenced by one object. Therefore, XStream has to find a view that contains all aspects to recreate objects.
However, some parts may be redundant, for example. if the member field is lazy initialized and its contents can be easily recreated. In this case, the field can be omitted using XStream.omitField (class, string) .
@See: xStream documentation
+1