0

I am developing a WCF service . One of the data member is XElement Type. How can I return as XElement data member as a child Json. I have tried Newtonsoft.Json but its adding black splashes. My DataContract class is below

[DataContract]

public class Car
{
    /// <summary>
    /// Constructor.
    /// </summary>

    public Car()
    {
    }

    /// <summary>
    /// Gets id.
    /// </summary>
     [DataMember]
     public String Id { get; internal set; }

     /// <summary>
     /// Gets or sets name.
     /// </summary>
     [DataMember]
     public string Name { get; set; }

    /// <summary>
    /// Gets or sets form.
    /// </summary>
     [DataMember]
     public XElement Form { get; set; }

 }

4

0 回答 0