[{
"type": 0,
"stem": "123",
"deletionFlag": 1,
"choice": ["A"],
"postId": "123",
"solution":["A", "B"],
"score": 12.12,
"materialIds": "123"
},
{
"type": 1,
"stem": "234",
"deletionFlag": 1,
"choice": ["A", "B", "C"],
"postId": "234",
"solution": ["A", "B"],
"score": 12.23,
"materialIds": "234"
},
{
"type": 2,
"stem": "345",
"deletionFlag": 1,
"choice": ["A", "B"],
"postId": "345",
"solution":["A", "B"],
"score": 12.34,
"materialIds": "345"
}
]
// Save
@RequestMapping(value = "/submit", method = RequestMethod.POST)
public APIResponseBean saveHomeWork(@RequestBody List<Map<String, Object>> homeworklist) {
if (homeworklist == null) {
throw new GlobalException (Constants.HTTP_UNPROCESSABLE_ENTITY, "Submissions parameter error.");
}
List<HomeworkBean> saveList = new ArrayList<>();
for (Map<String, Object> homeworkBeanMap : homeworklist) {
// test
// System.out.println(homeworkBean);
// Get the id id be judged according to whether to add or modify
String id = (String) homeworkBeanMap.get("id");
/ * Submit answer * /
ArrayList solutionList = (ArrayList) homeworkBeanMap.get("solution");
String solution = String.valueOf(solutionList);
............................. omitted
Using the Postman test interface, one of the parameters is enumeration type, how to pass the parameter? 1 Meeting type: 2 Java physical class: 3. Controller control class 4 Postman uses JSON to pass t...
In the TP framework, the front desk sends an array-type json string to the backend, and the json string obtained by the I method in the background will change (you can capture the package under chrome...
From https://blog.csdn.net/yhj19920417/article/details/48690439, thanks to the author's selfless sharing. 1, the front desk in the array variable jsp: 2, the property is provided in ajax: Ajax code ex...
jQuery ajax pass json array to the background The front end code is as follows: Background code: Here is the params, which is data:{params:JSON.stringify(arr)}. The key of the aqx passed in the parame...
First, JS array turn JSON format transmission Keywords: json.stringify () Second, PHP receives JSON pass value Keywords: (1)html_entity_decode() (2) JSON_DECODE ($ list, true): The second parameter mu...
Suger team Author: Yu you peace background Scene 1: The front-end and docking interfaces are added, deleted, and checked. The parameters requested at the beginning are basically a single piece of data...
Background json array package, single-field json: Front-end acquisition:...
Background using json response transmission data (data in the database from the list, change to the front desk to json data transmission. No use @ResponseBody, in fact, this may be) Front Desk: First,...
information reception processing javascript json ajax obtaining interface information, javascript json information processing itself; By eval () json the received character string into a real object i...
Receiving a set of parameters of the array or reception parameters type of array need not be specified, but the collection @RequestParam required to specify the type for example as follows: String arr...