What am I doing wrong with JSON.NET's JsonConvert

前端 未结 4 2016
广开言路
广开言路 2021-01-27 04:56

json string

{
  \"success\": true,
  \"challenge_ts\": \"2016-11-03T17:30:00Z\",
  \"hostname\": \"mydomain.com\"
}

class

inter         


        
4条回答
  •  情话喂你
    2021-01-27 05:01

    the members must be public

    internal class reCaptchaResponse
    {
        public bool success { get; set; }
    public DateTime challenge_ts { get; set; }  // timestamp of the challenge load (ISO format yyyy-MM-dd'T'HH:mm:ssZZ)
        public string hostname { get; set; }        // the hostname of the site where the reCAPTCHA was solved
        public  string[] error_codes { get; set; }   // optional
    }
    

提交回复
热议问题