Hello Unity community!
I’m working with a third party dataset for a project and am loading the data into my app via JSON like so:
string basepath = “Data/” + TEAM_PREF + “_stats”;
TextAsset t = (TextAsset) Resources.Load( basepath, typeof(TextAsset));
string statsAsJson = t.text;
Stats loadedStats = JsonUtility.FromJson (statsAsJson);
This works great for the most part, but some of my JSON keys look like:
“s+p”
“s%”
“+/-”
which obviously can’t be the names of fields in my Serializable object.
Can anyone recommend a workaround for parsing keys like this with JsonUtility or is my only option to pre-process and rename the keys?