Last active
August 29, 2015 14:11
-
-
Save visamz/6109aa99f69bf0e09005 to your computer and use it in GitHub Desktop.
datatables-dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"DT_RowId": "row_1", // DT_RowId 是主键,可自定义 | |
//数据字段遵循 key: value | |
"users": { //users Model | |
"first_name": "Quynn", | |
"last_name": "Contreras", | |
"phone": "1-971-977-4681", | |
"site": "1" | |
}, | |
"sites": { // sites Model | |
"name": "Edinburgh" | |
} | |
}, | |
{ | |
"DT_RowId": "row_2", | |
"users": { | |
"first_name": "Kaitlin", | |
"last_name": "Smith", | |
"phone": "1-436-523-6103", | |
"site": "2" | |
}, | |
"sites": { | |
"name": "London" | |
} | |
} | |
], | |
"options": { | |
"users.site": [ | |
{ | |
"value": "1", | |
"label": "Edinburgh" | |
}, | |
{ | |
"value": "2", | |
"label": "London" | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{// 更新 成功后后返回数据 | |
"row": { | |
"DT_RowId": "row_3", | |
"first_name": "Ashton1", | |
"last_name": "Cox", | |
"position": "Junior Technical Author", | |
"email": "a.cox@datatables.net", | |
"office": "San Francisco", | |
"extn": "1562", | |
"age": "66", | |
"salary": "86000", | |
"start_date": "2009-01-12" | |
} | |
} | |
//更新 数据校验失败时数据格式 | |
{ | |
"fieldErrors": [ | |
{ | |
"name": "first_name", | |
"status": "This field is required" | |
}, | |
{ | |
"name": "last_name", | |
"status": "This field is required" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment