Unexpected behaviour with requered ordering positi

2019-07-31 16:58发布

问题:

Now as I know ServiceStack uses .NET's Xml DataContractSerializer to serialize/deserialize XML, but with it we have some truble in case when our webservice API used not .NET framework.

This problem very good described in this post if try short describe of problem:

Requirement of strict sequence of nodes XML is very uncomfortable for some external no. NET system.

Is it possible to use a different serialize or configure the ServiceStack used, so that he did not expect the elements in a rigidly defined positions?

回答1:

ServiceStack uses .NET's XML DataContract serializer under the hood. It is not customizable beyond what is offered by the underlying .NET's Framework implementation.

I've answered how to override the ServiceStack's default XML Serialization with a custom XML Serializer in this earlier question:

https://stackoverflow.com/a/13498725/85785