Hi,
Some example how I can deserialize a cloud script result ?
I have try tried PlayFab.SimpleJson.DeserializeObject but that is returning null (the response is ok Result.Results.ToString() looks like a valid json)
Thank you!
Hi,
Some example how I can deserialize a cloud script result ?
I have try tried PlayFab.SimpleJson.DeserializeObject but that is returning null (the response is ok Result.Results.ToString() looks like a valid json)
Thank you!
Absolutely - what you want to use is actually the ResultsEncoded for this. We have examples of this in our Samples repo in GitHub. For example, in the CrossPromotional example, you'll see the call to DeserializeObject in OnCheckinCallback (https://github.com/PlayFab/PlayFab-Samples/blob/5b95b32bfec9219a970e97a0b5a424b64ef6276e/Recipes/SimpleCrossPromotion/Unity3d-Example/CrossPromotional/Assets/PlayFab_Recipes/CrossPromotional/Scripts/CrossPromotional.cs) is like this:
List<ItemInstance> grantedItems = PlayFab.SimpleJson.DeserializeObject<List<ItemInstance>>(result.ResultsEncoded);
No one has followed this question yet.