analyze method
Analyzes the json object and populates classes starting with className.
If json is a Map, it analyzes the map's fields.
If json is a List, it analyzes the first item to determine the type.
Implementation
void analyze(dynamic json, String className) {
if (json is Map) {
_analyzeMap(json, className);
} else if (json is List && json.isNotEmpty) {
analyze(json.first, className);
}
}