Get json array from Web api into c#
As the error suggests,
You are deserializing an array into a class. It will never work. You need to deserialize it into either an array or a list using the below code snippet.
Try: var data = JsonConvert.DeserializeObject<List<Class2>>(response);
or var data = JsonConvert.DeserializeObject<Class2[]>(response);
and it will work fine.
EDIT 1:
foreach(var room in data){ string id = room.id; string name = room.name; // and so on}