(de)serialization with mincount 0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

(de)serialization with mincount 0

Ales Ledvinka

I'm trying to figure out handling of sometimes present, sometimes missing property.

No matter what the polymorphism option setting is
(using the <wsmb:PolymorphismMode>ExcludeSubClassProperties</wsmb:PolymorphismMode>)

when the property is listed as nil it seems it's the dead end even for the base SER_NS_CNT_STR_FLAGS macro with min 0 and max 1.
<n1:Caption xsi:nil="true"/>

Here is the debug:
returned (nil);
not enough (0 < 1) instances of element Caption
retval: -3
handling of element "Caption" failed = -3

I see the the __XmlSerializerInfo has the mincount it does not seem to be used anywhere but array code make_dyn_size_data.

What is the common practice of handling the string property that may not be present?

Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
Openwsman-devel mailing list
[hidden email]