728x90
Json 데이터를 Class 객체로 만들 때,
Json Key 값에 특수문자가 들어있는 경우가 있다.
JsonProperty 의 PropertyName 으로 Property 이름을 커스터마이징 할 수 있다.
[JsonProperty(PropertyName = "Feedback_IM&SR")]
string _feedback_imsr { get; set; }
How to customize property names and values with System.Text.Json - .NET
Learn how to customize property names and values when serializing with System.Text.Json in .NET.
learn.microsoft.com
https://stackoverflow.com/questions/38719368/special-characters-in-property-name
Special characters in property name
In my Application a webservice will return a json { "UserDetails": [ { "UserId": "57", "EmailId": "prasant@xyz.com", "UserName": "Prasant", "TimezoneMins"...
stackoverflow.com
728x90