예제 #1
0
 void Student::Login::deserialize(JSONValue& root) {
   mUserId = root.get("user_id", 0).asUInt();
 }
예제 #2
0
  void QuizSubmission::deserialize(JSONValue& root) {
    mId = root.get("id", 0).asUInt();
    mSubmissionId = root.get("submission_id", 0).asUInt();
    mUserId = root.get("user_id", 0).asUInt();
    mAttempt = root.get("attempt", 0).asUInt();
    mStartedAt = root.get("started_at", "").asString();
    mFinishedAt = root.get("finished_at", "").asString();
    mEndAt = root.get("end_at", "").asString();
    mValidationToken = root.get("validation_token", "").asString();
    mWorkflowState = root.get("workflow_state", "").asString();
    mScore = root.get("score", "").asDouble();
    mKeptScore = root.get("kept_score", "").asDouble();

    buildUrl();
  }