serialization JSON string differing from DatatcontractSerializer, if we serialize serializable object using JSON.Net

Aug 19, 2013 at 1:32 PM
I have a class some thing like below
[Serializable]
public class sample
{
    private int m_width;
    private int m_height;
    public int Width
    {
        get
        {
            return this.m_width;
        }
        set
        {
            this.m_width = value;
        }
    }

    public int Height
    {

        get
        {
            return this.m_height;
        }
        set
        {
            this.m_height = value;
        }
    }
}
If I use DataContractJsonSerializer to serialize the object of this class i get the json string as below:
{"m_height":1345,"m_width":1234}
If I use Newtonsoft.Json.dll to serialize this I am getting the out put like below:
{"Width":1234,"Height":1345}
Why DataContractSerializer using backing fields for serialization if class marked as serializable ?

Is there any way I can achieve the same thing using Newtonsoft.Json.dll