XML Deserialization Issue
Comments
-
I have an object “reward” with single property “rewardItemId” Int32 Allow Nulls.
When deserializing XML into the object, even though the property allows nulls, it fails if there is no value in the XML with the following exception.
System.InvalidOperationException: There is an error in XML document (3, 3). ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderreward.Read3_NullableOfInt32(Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderreward.Read4_reward(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderreward.Read5_reward()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
at DecisionsFramework.Design.Flow.CoreSteps.XML.XMLDeserializeStep.Run(StepStartData data) -
If youre using XML that is being built manually with string steps, it is encouraged that you use the Xml Serialize step from an object first. Then, use the output String from that in the following steps. This will ensure that required attributes are output correctly in the XML string.
Howdy, Stranger!
Categories
- 4.4K All Categories
- 86 General
- 13 Training
- 212 Installation / Setup
- 1.2K Flows
- 111 Rules
- 282 Administration
- 216 Portal
- 500 General Q & A
- 718 Forms
- 353 Reports
- 3 Designer Extensions
- 48 Example Flows
- 58 CSS Examples
- 1 Diagram Tile
- 8 Javascript Controls
- 189 Pages
- 5 Process Mining
- New Features
- 187 Datastructures
- 71 Repository
- 233 Integrations
- 30 Multi-Tenant
- 27 SDK
- 81 Modules
- 60 Settings
- 27 Active Directory
- 12 Version 7
- 36 Version 8
- 143 Lunch And Learn Questions