I’ve read several threads and am still confused whether I need to use a wrapper or not.
I’ve tried the example which unity suggest but am getting an error.
Should the following work?
My json string returned from an http request is:
[{“orderId”: “a75305ca-31ee-47d9-98ee-9cfc0c8a032a”, “bid_item”: “1”}, {“orderId”: “cfb62c93-d8ca-4447-9842-90a6710dd394”, “bid_item”: “5”}]
[Serializable]
public class ItemList
{
public List item;
}
[Serializable]
public class Item{
public string orderId;
public string bid_item;
}
ItemList deserialized = JsonUtility.FromJson(response);
Error: ArgumentException: JSON must represent an object type