Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Unmarshal "null" to "no tag" instead of empty tag #14

Open
drankfrabbin opened this issue Sep 18, 2013 · 1 comment
Open

Unmarshal "null" to "no tag" instead of empty tag #14

drankfrabbin opened this issue Sep 18, 2013 · 1 comment
Assignees
Milestone

Comments

@drankfrabbin
Copy link

Currently Pirity marshals "null" to empty tags:

String foo = null;

becomes

<foo\>

Unmarshalling that back to a java object with JaxB will cause "foo" to be an empty string, rather than null.

Would it be possible to add the ability to omit the tag when marshalling "null"s?

@ghost ghost assigned hpehl Oct 8, 2013
@gallafent
Copy link

I would also like to see an option for the serialiser to serialise a null element as “absent” rather than the current “empty”. I need this in order to drive a third party API which expects some optional elements to be either present and set to a valid value, or completely absent; present but empty is not an acceptable input to that API!

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

No branches or pull requests

3 participants