Advertisement
dewthossapol

simulation

Jan 18th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. // answer api json
  3.  
  4. "answer": [
  5.   "A",
  6.   "A",
  7.   "B"
  8. ]
  9.  
  10.  
  11. *********************************************************
  12. // final answer json
  13.  
  14. "answer": [
  15.   {
  16.     "answer": "A",
  17.     "answer_id": 1,
  18.     "question_id": 1
  19.   },
  20.   {
  21.     "answer": "AB",
  22.     "answer_id": 2,
  23.     "question_id": 2
  24.   }
  25. ],
  26.  
  27.  
  28. *********************************************************
  29. // summary answer json
  30.  
  31. "summary": [
  32.   {
  33.     "section_id": 1,
  34.     "score": 100,
  35.     "parts": [
  36.       {
  37.         "part_id": 1,
  38.         "score": 1
  39.       }
  40.     ]
  41.   }
  42. ]
  43.  
  44.  
  45. *********************************************************
  46. // check answer json
  47.  
  48. [
  49.   {
  50.     "id": 1, // section
  51.     "parts": [
  52.       {
  53.         "id": 1, // part
  54.         "questions": [
  55.           {
  56.             "id": 1, // question
  57.             "answers": [
  58.               {
  59.                 "id": 1, // answer
  60.                 "score": 1,
  61.                 "answer": "A"
  62.               },
  63.             ]
  64.           },
  65.           {
  66.             "id": 2,
  67.             "answers": [
  68.               {
  69.                 "id": 2 // answer
  70.                 "score": 1,
  71.                 "answer": "A"
  72.               },
  73.               {
  74.                 "id": 3// answer
  75.                 "score": 2,
  76.                 "answer": "B"
  77.               },
  78.             ]
  79.           },
  80.         ]
  81.       }
  82.     ]
  83.   }
  84. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement