fromNdJson static method
Accepts a String in ndJson format and converts it into a list of resources
Implementation
static List<Resource> fromNdJson(String content) {
final List<String> resourceStrings = content.split('\n');
final List<Resource> resourceList = <Resource>[];
for (final String resource in resourceStrings) {
if (resource.isNotEmpty) {
resourceList.add(
Resource.fromJson(jsonDecode(resource) as Map<String, dynamic>));
}
}
return resourceList;
}