I'm trying to parse a JSON into a model in Flutter. But I get this error a lot
'String' is not a subtype of type 'Map<String, dynamic>'
Which indicates that the model is expecting a Map but is getting a String instead.
My question is, is there a way to know which JSON key is causing that failure?! instead of printing the JSON and comparing the keys with the models
something like
parsing 'country' failed
'String' is not a subtype of type 'Map<String, dynamic>'
Thanks.