tryJson<T> static method
Implementation
static ModelLessArray<T>? tryJson<T>(String jsonString) {
try {
List<dynamic> jsonData = json.decode(jsonString);
ModelLessArray<T> arrayApiModels = ModelLessArray();
for (var element in jsonData) {
ModelLess apiModel = ModelLess.fromMap(element);
arrayApiModels.set(apiModel);
}
return arrayApiModels;
} catch (e) {
return null;
}
}