您好我有一个SQL服务存储过程,它返回如下数据(请参见下图)。
我想创建一个类似于下面的JSON数组 -
blankForms = [{
"category":"IT Requisition",
"forms":[{
"formId":"29C37639-C4F3-4F0E-B7BD-8823B73B92A1",
"formName":"Employee_Details.doc",
"formDescription":"Employee Joining Details Form 3",
"contentType":"application/msword",
"companyId":3,
"lastUpdated":"2017-07-06",
"uploadedByUserId":"0500178"
},
{
"formId":"85470C02-9255-4F46-99D5-5E80DA58A026",
"formName":"Employee_Details.doc",
"formDescription":"Employee Details Form",
"contentType":"application/msword",
"companyId":3,
"lastUpdated":"2017-07-06",
"uploadedByUserId":"0500178"
}]
},
{
"category":"Employee Joining",
"forms":[{
"formId":"94D7A0D5-43D1-47EC-9E5D-3E9873932419",
"formName":"IT Info Sheet 59.pdf",
"formDescription":"IT Requisition Form",
"contentType":"application/pdf",
"companyId":3,
"lastUpdated":"2017-07-06",
"uploadedByUserId":"0500178"
}]
}]
知道如何在C#中做到这一点。请建议。