String tagNameFromJson(Map<String, dynamic> json) { if (json.length != 1) { throw Exception("JSON element must have a single key"); } return json.keys.first; }