You must Sign In to post a response.
  • Category: Webservices

    Json Web service property always null

    XML



    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <RequestData>
    <org_name>1111 Organization</org_name>
    <location>
    <loc_name>Location 02</loc_name>
    <branch>
    <branch_name>Branch 03</branch_name>
    <users>
    <user>
    <user_name>sadfadsf</user_name>
    <user_unique_id>sadfadsf</user_unique_id>
    <image_unique_name_id>1415460443_0_0</image_unique_name_id>
    </user>
    </users>
    </branch>
    </location>
    </RequestData>



    Property :




    [DataContract(Namespace = "")]
    public class RequestData
    {
    [DataMember]
    public string org_name { get; set; }

    [DataMember(Name = "loc_name")]
    public IEnumerable<Page> Pages { get; set; }



    [DataMember]
    public string branch_name { get; set; }

    [DataMember]
    public string user_name { get; set; }
    [DataMember]
    public string user_unique_id { get; set; }

    [DataMember]
    public string image_unique_name_id { get; set; }

    }



    Always data is coming wrong...except org_name element.
  • #753881
    This is a collection type

    public IEnumerable<Page>


    Please make sure that all the inner member of page type are also deserailzable.

    Verify that [Serializable] attribute is there.

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM


  • Sign In to post your comments