I get my data retrieved in this way
var parentData = dataContext.Fetch<MakerCheckerViewModel>
(PetaPoco.Sql.Builder.Append
("SELECT MakerCheckerId
,ModelName
,mkCk.CheckerStatusId
,chkSt.CheckerStatusName
FROM MakerChecker as mkCk
JOIN CheckerStatus as chkSt ON
mkCk.CheckerStatusId=chkSt.CheckerStatusId")
).ToList();
I need to convert it into json. I referred these links How to convert JSON to XML or XML to JSON? but using this it can convert only the string data but not the list types.
Also I cannot do it inside Linq as done here convert list to xml in c# as I have the bunch data which will be increasing more in future so I need something like this
var parentDataJson = JsonConvert.SerializeObject(parentData);
which is done to convert to json. So similar functionality would be there for xml data too. Please help!!