JSON Property Casing
convert camel case property to pascal case
System.Text.Json
Newtonsoft.Json
public class Refunds { public string @object { get; set; } public bool has_more { get; set; } } public class Source { public int? bank_account { get; set; } public string address_city { get; set; } } public class RootObject { public Refunds refunds { get; set; } public Source source { get; set; } }
using System.Text.Json.Serialization; public class Refunds { [JsonPropertyName("object")] public string Object { get; set; } [JsonPropertyName("has_more")] public bool HasMore { get; set; } } public class Source { [JsonPropertyName("bank_account")] public int? BankAccount { get; set; } [JsonPropertyName("address_city")] public string AddressCity { get; set; } } public class RootObject { [JsonPropertyName("refunds")] public Refunds Refunds { get; set; } [JsonPropertyName("source")] public Source Source { get; set; } }
Submit
Copy