import 'dart:convert';
main() {
String arrayObjsText =
'{"tags": [{"name": "dart", "quantity": 12}, {"name": "flutter", "quantity": 25}, {"name": "json", "quantity": 8}]}';
var tagObjsJson = jsonDecode(arrayObjsText)['tags'] as List;
List<Tag> tagObjs = tagObjsJson.map((tagJson) => Tag.fromJson(tagJson)).toList();
print(tagObjs);
}