ps.
ps.

Reputation: 4360

XmlSerializer vs DataContractSerializer

I just realized that DataContractSerializer expects nodes in the alphabetical order or the specified order. Is there any way i could make it NOT do it?

TIA

Upvotes: 3

Views: 2050

Answers (2)

ps.
ps.

Reputation: 4360

I used IDispatchMessageInspector.AfterReceiveRequest to intercept the message and sort it alphabetically.

Upvotes: 3

kbrimington
kbrimington

Reputation: 25642

I don't think so. You may find the discussion on this question informative:

Ignore field order in DataContractSerializer

Upvotes: 4

Related Questions