Serialize to JSON with parenthesis in property name

后端 未结 1 1997
傲寒
傲寒 2021-01-25 10:22

I\'m using paypal api to do some payment stuff.

If I look at SetExpressCheckout some field are in the form PAYMENTREQUEST_n_AMT. That\'s fine for me because

相关标签:
1条回答
  • 2021-01-25 10:55

    You can customize JSON property names with the JsonProperty attribute:

    public class Request
    {
        [JsonProperty("receiverList.receiver(0).email")]
        public string Email { get; set; }
    }
    
    0 讨论(0)
提交回复
热议问题