This is what
http://json2csharp.com/ created:
public class DdlItem
{
public string QuestionId { get; set; }
public string AnswerId { get; set; }
public string AnswerOption { get; set; }
}
public class TxtItem
{
public string QuestionId { get; set; }
public string AnswerId { get; set; }
public string AnswerText { get; set; }
}
public class RootObject
{
public List<DdlItem> ddlItems { get; set; }
public List<TxtItem> txtItems { get; set; }
public string categoryId { get; set; }
}
After that you can use following code:
using System.Web.Script.Serialization;
JavaScriptSerializer oJS = new JavaScriptSerializer();
RootObject oRootObject = new RootObject();
oRootObject = oJS.Deserialize<RootObject>(Your JSon String);