When fetching player entity data from backend I run into the situation where I have to parse the data multiple times to load it into my client side value objects. Feels like there should exist a more efficient way to deal with this?
response here is a GetObjectsResponse from PlayFabDataApi.GetObjects
JsonObject jsonResult = (JsonObject)response.Objects["PlayerObject"].DataObject; // Debug.Log(jsonResult.ToString()); PlayerObject obj = JsonUtility.FromJson<PlayerObject>(jsonResult.ToString());
as you can see there's a ToString performed on the JsonObject before parsing it with JsonUtility to my own Type. And I can only assume there is some parsing inside the PlayFab sdk as well of whatever comes over the wire from backend. This seems excessive to me. Is there a way to slim this down?