I have a web service that returns an empty list (just []).
JsonUtility.FromJson is giving me an
ArgumentException: JSON must represent an object type.
I have isolated this down to a bit of code as simple as:
string empty = "[]";
FriendManager.FriendList test = JsonUtility.FromJson<FriendManager.FriendList>(empty);
Assert.IsNotNull(test);
FriendList is just a wrapper for Friend[]. I also tried List<Friend>:
string empty = "[]";
FriendManager.FriendList test = JsonUtility.FromJson<List<Friend>>(empty);
Assert.IsNotNull(test);
Am I missing something obvious?
I have control over the server data (Spring Boot JSON web service) and the client (Unity3D).