0

So I am trying to use Unitys JsonUtility library to parse an api response. My current problem with parsing this response is that one of the properties has the name "class". Because of that, I can't just name a field in the C# representation like the property as usual (which is required for parsing). My Question at this point is, is there a way to name the C# Field that will result in the right json-property of name "class" to be read?

The response I receive is also quite large and I have already put a lot of work into building a c#-representation for this response so I would prefer not to switch the library (unless the other library works similarly).

Edit: I have tried a couple names for the field: "Class", "_class"

Jann Stute
  • 13
  • 4
  • If that one doesn't then perhaps one of the duplicates listed in this question do: [How can i Serialize c# keyword in Json string duplicate](https://stackoverflow.com/questions/52881047/how-can-i-serialize-c-sharp-keyword-in-json-string) – Ibrennan208 Oct 05 '22 at 21:14

0 Answers0