示例#1
0
        private string CreateRequestBody(string problemId)
        {
            JObject requestBody = TokenUtil.CreateJObject();

            requestBody.Add(ConstFieldProblemId, problemId);

            return(requestBody.ToString());
        }
示例#2
0
        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());
        }