I'm really new too Json and I'm trying to call a Web Service.
When the service return an array of one element de json string for this array is without the [ ]. This cause a Exception in the serializer I use. (I use this one http://james.newtonking.com/)
My question is simple can I add something too tell to the deserializer to always take this section for a Array
In my code i have this model class
public class Company : BaseEntity
{
#region Constructors
public Company()
{
}
public Company(int id, string name, string description)
{
Id = id;
Name = name;
Description = description;
}
#endregion
#region Properties
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public List<Industry> IndustryList { get; set;}
#endregion
}
And the Json for a company with one industry is
{"company":{"description":"Societe de Google","id":"0","industryList":{"id":"0","name":"Technologies Cool"},"name":"Google Inc."}
Maybe, i should change the serilizer tool too, I'm open too. All work find with other list of 2 or more elements or if I change the List for Industry but sometime I will receive more than one industry.
Thank you.