HI everyone,
Im new here, and im a bit lost.
I'm calling an Azure function with unity, my function return :GetUserInventoryAsync(req);
When i'm checking the json, it look ok :
"{\"result\":{\"inventory\":[{\"annotation\":null,\"bundleContents\":null,\"bundleParent\":null,\"catalogVersion\":\"Item\",\"customData\":{\"Attack\":\"6\"},\"displayName\":\"My first item\",\"expiration\":null,\"itemClass\":\"Helmet\",\"itemId\":\"Helmet\",\"itemInstanceId\":\"EB4C568067D54323\",\"purchaseDate\":\"2021-11-16T12:51:03.629Z\",\"remainingUses\":null,\"unitCurrency\":null,\"unitPrice\":0,\"usesIncrementedBy\":null},{\"annotation\":null,\"bundleContents\":null,\"bundleParent\":null,\"catalogVersion\":\"Item\",\"customData\":null,\"displayName\":\"My first item\",\"expiration\":null,\"itemClass\":\"Helmet\",\"itemId\":\"Helmet\",\"itemInstanceId\":\"A38E8CDB6BC180D5\",\"purchaseDate\":\"2021-11-16T12:50:53.323Z\",\"remainingUses\":null,\"unitCurrency\":null,\"unitPrice\":0,\"usesIncrementedBy\":null}],\"playFabId\":\"E3FF6E6B12136B95\",\"virtualCurrency\":{\"GO\":50},\"virtualCurrencyRechargeTimes\":{}},\"customData\":null,\"error\":null}"
My question is : How can i work with these info ? What is the best way to do it ?
I tried to Deserialize the json into "GetUserInventoryResult", but the object is empty.
GetUserInventoryResult r = PlayFabSimpleJson.DeserializeObject<GetUserInventoryResult>(result.FunctionResult.ToString());
Thanks for your help :)
,Hi everyone,
Im new here and im a bit lost.
Im calling an Azure function from Unity,
my Azure function is returning : GetUserInventoryAsync(request);and when i check the result.functionResult the json look ok :"{\"result\":{\"inventory\":[{\"annotation\":null,\"bundleContents\":null,\"bundleParent\":null,\"catalogVersion\":\"Item\",\"customData\":{\"Attack\":\"6\"},\"displayName\":\"My first item\",\"expiration\":null,\"itemClass\":\"Helmet\",\"itemId\":\"Helmet\",\"itemInstanceId\":\"EB4C568067D54323\",\"purchaseDate\":\"2021-11-16T12:51:03.629Z\",\"remainingUses\":null,\"unitCurrency\":null,\"unitPrice\":0,\"usesIncrementedBy\":null},{\"annotation\":null,\"bundleContents\":null,\"bundleParent\":null,\"catalogVersion\":\"Item\",\"customData\":null,\"displayName\":\"My first item\",\"expiration\":null,\"itemClass\":\"Helmet\",\"itemId\":\"Helmet\",\"itemInstanceId\":\"A38E8CDB6BC180D5\",\"purchaseDate\":\"2021-11-16T12:50:53.323Z\",\"remainingUses\":null,\"unitCurrency\":null,\"unitPrice\":0,\"usesIncrementedBy\":null}],\"playFabId\":\"E3FF6E6B12136B95\",\"virtualCurrency\":{\"GO\":50},\"virtualCurrencyRechargeTimes\":{}},\"customData\":null,\"error\":null}"
What is the best way to work with these infos ?
I tried to Deserialize the json into "GetUserInventoryResult", but everything is empty.
GetUserInventoryResult r = PlayFabSimpleJson.DeserializeObject<GetUserInventoryResult>(result.FunctionResult.ToString());
Thanks for your help !