네 확실합니다. 예를 들면 :
var obj = {};
obj.Name = "Employee name";
obj.responseStatus = {
status: {
statuscode: "200",
statusmessage: "Success"
}
};
obj.Department = {
DepartmentName: "Name",
info: []
};
obj.Department.info.push({
code: "400",
status: "valid",
etc: true
});
res.end(JSON.stringify(obj));
jsonlint로 검증 된 원본 게시물
{
"Name": "Employee name",
"responseStatus": {
"status": {
"statuscode": "200",
"statusmessage": "Success"
}
},
"Department": {
"DepartmentName": "Name",
"info": [
{
"code": "400",
"status": "valid",
"DepartmentData": [
{
"key": "key",
"value": "value"
},
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}
]
}
}
출처
https://stackoverflow.com/questions/22007802