How to de/serialise sealed classes with objects #149
Unanswered
jbruchanov
asked this question in
Q&A
Replies: 1 comment
-
The problem is that (not specific to XML) objects are only serialized in their existence (an empty tag by default in XML - it is possible to switch to attributes in the policy), not with any members. A separate thing is that an object inside a class is not actually a member of the instance. The actual strings are a value, but never a type, so there is no annotation to write the string value as tag content. In this case it is probably easiest to use a custom serializer, or not use an object but an actual value. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm fighting little bit with the annotation here, anyone would be able to help ?
having following code
what I'm trying to do
but getting stuff like
Beta Was this translation helpful? Give feedback.
All reactions