1

I see something strange in the serialization ServiceStack.

I have a class that inherits from another class, but when I send serialize the order which is the reverse (first class properties and then the base class) And according to the document (http://msdn.microsoft.com/en-us/library/vstudio/ms729813(v=vs.100).aspx) the DataContract and DataMember to first order should be the base class after the class.

Does anyone know why? Or how can I solve this? Because it is very strange serialization in reverse order.

public class BaseDTO {
    public String Property1 { get; set; }
}
public class AnotherDTO : BaseDTO {
    public String Property2 { get; set; }
}

Result: { Property2: "........", Property1: "........", }

Expected Result: { Property1: "........", Property2: "........", }

  • It would be useful if you could include example DTOs, including the current result and what you expect. – Scott Sep 05 '14 at 15:45

0 Answers0