If I run your JSON through a class generator (I use
Convert JSON to C# Classes Online - Json2CSharp Toolkit[
^]) it does say it's invalid: and it is.
Your API is returning bad JSON - specifically, this line:
"id" : 2
requires a terminating comma. Add that, and it starts to work:
[
{
"id": 1,
"name": "name1",
"type": 0
},
{
"id" : 2,
"name" : "name2",
"type" : 1
}
]