WCF Disable Deserialization Order Sensitivity

后端 未结 4 588
说谎
说谎 2020-12-09 15:01

I have a recurring problem when passing Serialized objects between non-.NET Clients, and .NET WCF Services.

When WCF Deserializes objects, it is strictly dependant

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 15:42

    There's an old thread on this here:

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a891928b-d27a-4ef2-83b3-ee407c6b9187

    Looks like the only option is to swap the serializer, but then it becomes opt in which is even more annoying.

    Edit: you could write your own serializer to re-order the elements and then pass it on to DataContractSerializer.

提交回复
热议问题