private string CreateRequestBody(string problemId) { JObject requestBody = TokenUtil.CreateJObject(); requestBody.Add(ConstFieldProblemId, problemId); return(requestBody.ToString()); }
private string CreateRequestBody(JudgeResult result) { InnerJudgeResult innerResult = new InnerJudgeResult { SubmitId = result.SubmitId, JudgeDetail = result.JudgeDetail, MemoryCost = result.MemoryCost, PassRate = result.PassRate, ResultCode = result.ResultCode, TimeCost = result.TimeCost }; JObject requestJObject = TokenUtil.CreateJObject(); requestJObject.Add("result", Json.Serialize(innerResult)); return(requestJObject.ToString()); }