Hi,
You can use following method to convert JSON string from Object.
public class Message
{
public string Description { get; set; }
public int Id { get; set; }
}
Message myReturnData = new Message() { Description = "This is test description", Id = 1 };
string json = JsonConvert.SerializeObject(myReturnData);
You must have reference of newtonsoft JSON Library
Introduction[
^]
Regards,
Imdadhusen