Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmodifiable Lists converter #340

Open
adjiandov opened this issue Jun 12, 2023 · 1 comment
Open

Unmodifiable Lists converter #340

adjiandov opened this issue Jun 12, 2023 · 1 comment
Assignees

Comments

@adjiandov
Copy link

With newer java versions it is common to collect a collection with the built-in stream collectors (e.g. stream.toList()) which results in an immutable list.
There is no XStream converter for an unmodifiable list and the output of the xml serialisation looks weird and very different from a normal collection serialisation. There are extra attributes to the top element like class, resolves-to and serialization as well as some extra tags like <java.util.CollSer>.

Is there any way around this or a plan for a built int Converter?

Thank you

@joehni joehni self-assigned this Jun 22, 2023
@joehni
Copy link
Member

joehni commented Jun 22, 2023

XStream has a converter for an unmodifiable list, but this is none. At least it is not the same type of class returned by Collections.unmodifiableList(). It should be possible to write one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants