The following Json
{
"success": 1,
"login": [
{
"username": "123456",
"password": "123456",
"store_authority": "Yes",
"fyear": "2018-19"
}
]
}
Is not an enumerable of "Root Objects. It contains a list but isn't one.
The correct way to deserialize it is:
var model = JsonConvert.DeserializeObject<RootObject>(json);
To be valid JSON for your desrializer it would have to look like this:
[{
"success": 1,
"login": [
{
"username": "123456",
"password": "123456",
"store_authority": "Yes",
"fyear": "2018-19"
}
]
}]
Note the extra square brackets
Hope that helps
Andy