cs
              
              
            
          
          string test = JsonConvert.SerializeObject(new
{
    UserCode = "TEST",
    Source = "TEST",
    DeviceTypeCode = "质量",
    DataRows = new object[]
       {
            new
            {
                ItemCode = "123123",
                DepartmentName="车间",
                PackName="",
                ProblemOperationCode="P0185-PZ-MB-001",
                ProblemOid= "8228bc0b-15a6-43d7",
                IsFillPlate = "false",
                ReworkProblemRemark="质量NG",
                ChargePerson = "",
                CheckPerson = "",
                CreateOperationCode = "PZ-MB-001"
            }
       }
}, Newtonsoft.Json.Formatting.Indented);
        生成的结果:
{
"UserCode": "TEST",
"Source": "TEST",
"DeviceTypeCode": "质量",
"DataRows": [
{
"ItemCode": "123123",
"DepartmentName": "车间",
"PackName": "",
"ProblemOperationCode": "P0185-PZ-MB-001",
"ProblemOid": "8228bc0b-15a6-43d7",
"IsFillPlate": "false",
"ReworkProblemRemark": "质量NG",
"ChargePerson": "",
"CheckPerson": "",
"CreateOperationCode": "PZ-MB-001"
}
]
}