Open dagnelies opened 5 years ago
That might make sense, although my concern would be that there are often minor differences in preferences, so although immediate decision of primitives might be simple enough, questions like "how about matching Wrappers?", "I want same for String
s", "Why not Date/Time values too" would probably start soon.
What might make sense would be offering pluggability of object that can decide for "unmarked" properties (i.e. nothing to indicate preference) which way to go. And perhaps provide a default implementation for special case of primitives.
It would be nice if primitive values were serialized as attributes by default ...or if there was a flag to do that.
Currently, the generated XML is either very verbose or you need lots of annotations everywhere.