You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marshalling generates empty tags for empty POM fields.
It could be nice to add omitempty tags to the lib's structs in order to avoid polluting the marshaled XML with empty tags.
@chavacava
I agree that this is a nice feature, I am however a bit worried that changing this would break existing applications that depend on the empty tags getting generated.
So somehow we need to make it configurable to keep the backwards compatibility. I don't have an obvious solution that would work fine without massive code duplication currently, but will look into it. Do you have any ideas?
Omitting empty fields requires modifying the POM data model thus, as you said, it might cause some compatibility problems.
Providing an ad-hoc (with empty fields omitted) marshaling method could be a backward compatible approach.
This issue has now been resolved in version v1.0.0.
Ended up just making the change and bumping the major version instead of working out a way to keep backwards compatibility. Projects needing the empty fields when marshalling need to handle this on the client side before updating to the new major version. I assume the number of projects depending on this is quite small.
Marshalling generates empty tags for empty POM fields.
It could be nice to add
omitempty
tags to the lib's structs in order to avoid polluting the marshaled XML with empty tags.PS: thanks @vifraa for the nice lib.
The text was updated successfully, but these errors were encountered: