diff --git a/head/dart/test/inputs/json/misc/00c36.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/00c36.json/default/TopLevel.dart
new file mode 100644
index 0000000..b41c337
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/00c36.json/default/TopLevel.dart
@@ -0,0 +1,121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<dynamic> topLevelFromJson(String str) => List<dynamic>.from(json.decode(str).map((x) => x));
+
+String topLevelToJson(List<dynamic> data) => json.encode(List<dynamic>.from(data.map((x) => x)));
+
+class TopLevelElement {
+    final Country country;
+    final String date;
+    final String decimal;
+    final Country indicator;
+    final String value;
+
+    TopLevelElement({
+        required this.country,
+        required this.date,
+        required this.decimal,
+        required this.indicator,
+        required this.value,
+    });
+
+    factory TopLevelElement.fromJson(Map<String, dynamic> json) => TopLevelElement(
+        country: Country.fromJson(json["country"]),
+        date: json["date"],
+        decimal: json["decimal"],
+        indicator: Country.fromJson(json["indicator"]),
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "country": country.toJson(),
+        "date": date,
+        "decimal": decimal,
+        "indicator": indicator.toJson(),
+        "value": value,
+    };
+}
+
+class Country {
+    final Id id;
+    final Value value;
+
+    Country({
+        required this.id,
+        required this.value,
+    });
+
+    factory Country.fromJson(Map<String, dynamic> json) => Country(
+        id: idValues.map[json["id"]]!,
+        value: valueValues.map[json["value"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": idValues.reverse[id],
+        "value": valueValues.reverse[value],
+    };
+}
+
+enum Id {
+    US,
+    NY_GDP_MKTP_CD
+}
+
+final idValues = EnumValues({
+    "US": Id.US,
+    "NY.GDP.MKTP.CD": Id.NY_GDP_MKTP_CD
+});
+
+enum Value {
+    UNITED_STATES,
+    GDP_CURRENT_US
+}
+
+final valueValues = EnumValues({
+    "United States": Value.UNITED_STATES,
+    "GDP (current US\u0024)": Value.GDP_CURRENT_US
+});
+
+class PurpleTopLevel {
+    final int page;
+    final int pages;
+    final String perPage;
+    final int total;
+
+    PurpleTopLevel({
+        required this.page,
+        required this.pages,
+        required this.perPage,
+        required this.total,
+    });
+
+    factory PurpleTopLevel.fromJson(Map<String, dynamic> json) => PurpleTopLevel(
+        page: json["page"],
+        pages: json["pages"],
+        perPage: json["per_page"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "page": page,
+        "pages": pages,
+        "per_page": perPage,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/00ec5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/00ec5.json/default/TopLevel.dart
new file mode 100644
index 0000000..b9ee697
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/00ec5.json/default/TopLevel.dart
@@ -0,0 +1,301 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String basePath;
+    final Definitions definitions;
+    final String host;
+    final Info info;
+    final Paths paths;
+    final List<String> produces;
+    final List<String> schemes;
+    final String swagger;
+
+    TopLevel({
+        required this.basePath,
+        required this.definitions,
+        required this.host,
+        required this.info,
+        required this.paths,
+        required this.produces,
+        required this.schemes,
+        required this.swagger,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        basePath: json["basePath"],
+        definitions: Definitions.fromJson(json["definitions"]),
+        host: json["host"],
+        info: Info.fromJson(json["info"]),
+        paths: Paths.fromJson(json["paths"]),
+        produces: List<String>.from(json["produces"].map((x) => x)),
+        schemes: List<String>.from(json["schemes"].map((x) => x)),
+        swagger: json["swagger"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "basePath": basePath,
+        "definitions": definitions.toJson(),
+        "host": host,
+        "info": info.toJson(),
+        "paths": paths.toJson(),
+        "produces": List<dynamic>.from(produces.map((x) => x)),
+        "schemes": List<dynamic>.from(schemes.map((x) => x)),
+        "swagger": swagger,
+    };
+}
+
+class Definitions {
+    final Provider provider;
+
+    Definitions({
+        required this.provider,
+    });
+
+    factory Definitions.fromJson(Map<String, dynamic> json) => Definitions(
+        provider: Provider.fromJson(json["Provider"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Provider": provider.toJson(),
+    };
+}
+
+class Provider {
+    final Map<String, Property> properties;
+
+    Provider({
+        required this.properties,
+    });
+
+    factory Provider.fromJson(Map<String, dynamic> json) => Provider(
+        properties: Map.from(json["properties"]).map((k, v) => MapEntry<String, Property>(k, Property.fromJson(v))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": Map.from(properties).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+    };
+}
+
+class Property {
+    final String description;
+    final Type type;
+
+    Property({
+        required this.description,
+        required this.type,
+    });
+
+    factory Property.fromJson(Map<String, dynamic> json) => Property(
+        description: json["description"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum Type {
+    STRING
+}
+
+final typeValues = EnumValues({
+    "string": Type.STRING
+});
+
+class Info {
+    final String description;
+    final String title;
+    final String version;
+
+    Info({
+        required this.description,
+        required this.title,
+        required this.version,
+    });
+
+    factory Info.fromJson(Map<String, dynamic> json) => Info(
+        description: json["description"],
+        title: json["title"],
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "title": title,
+        "version": version,
+    };
+}
+
+class Paths {
+    final BusinessServiceProvidersSearch businessServiceProvidersSearch;
+
+    Paths({
+        required this.businessServiceProvidersSearch,
+    });
+
+    factory Paths.fromJson(Map<String, dynamic> json) => Paths(
+        businessServiceProvidersSearch: BusinessServiceProvidersSearch.fromJson(json["/business_service_providers/search"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "/business_service_providers/search": businessServiceProvidersSearch.toJson(),
+    };
+}
+
+class BusinessServiceProvidersSearch {
+    final Get businessServiceProvidersSearchGet;
+
+    BusinessServiceProvidersSearch({
+        required this.businessServiceProvidersSearchGet,
+    });
+
+    factory BusinessServiceProvidersSearch.fromJson(Map<String, dynamic> json) => BusinessServiceProvidersSearch(
+        businessServiceProvidersSearchGet: Get.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": businessServiceProvidersSearchGet.toJson(),
+    };
+}
+
+class Get {
+    final String description;
+    final List<Parameter> parameters;
+    final Responses responses;
+    final String summary;
+    final List<String> tags;
+
+    Get({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory Get.fromJson(Map<String, dynamic> json) => Get(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: Responses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class Parameter {
+    final String description;
+    final Type format;
+    final String name;
+    final String parameterIn;
+    final bool required;
+    final Type type;
+
+    Parameter({
+        required this.description,
+        required this.format,
+        required this.name,
+        required this.parameterIn,
+        required this.required,
+        required this.type,
+    });
+
+    factory Parameter.fromJson(Map<String, dynamic> json) => Parameter(
+        description: json["description"],
+        format: typeValues.map[json["format"]]!,
+        name: json["name"],
+        parameterIn: json["in"],
+        required: json["required"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "format": typeValues.reverse[format],
+        "name": name,
+        "in": parameterIn,
+        "required": required,
+        "type": typeValues.reverse[type],
+    };
+}
+
+class Responses {
+    final The200 the200;
+
+    Responses({
+        required this.the200,
+    });
+
+    factory Responses.fromJson(Map<String, dynamic> json) => Responses(
+        the200: The200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class The200 {
+    final String description;
+    final Schema schema;
+
+    The200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory The200.fromJson(Map<String, dynamic> json) => The200(
+        description: json["description"],
+        schema: Schema.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class Schema {
+    final String ref;
+
+    Schema({
+        required this.ref,
+    });
+
+    factory Schema.fromJson(Map<String, dynamic> json) => Schema(
+        ref: json["\u0024ref"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "\u0024ref": ref,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/010b1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/010b1.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/010b1.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/050b0.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/050b0.json/default/TopLevel.dart
new file mode 100644
index 0000000..3beb7f4
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/050b0.json/default/TopLevel.dart
@@ -0,0 +1,211 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<OtherName> otherNames;
+    final String? supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<OtherName>.from(json["other_names"].map((x) => OtherName.fromJson(x))),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x.toJson())),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    DEP5,
+    SPDX,
+    TROVE
+}
+
+final schemeValues = EnumValues({
+    "DEP5": Scheme.DEP5,
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE
+});
+
+enum Keyword {
+    OSI_APPROVED,
+    POPULAR,
+    PERMISSIVE,
+    COPYLEFT
+}
+
+final keywordValues = EnumValues({
+    "osi-approved": Keyword.OSI_APPROVED,
+    "popular": Keyword.POPULAR,
+    "permissive": Keyword.PERMISSIVE,
+    "copyleft": Keyword.COPYLEFT
+});
+
+class Link {
+    final Note note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: noteValues.map[json["note"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": noteValues.reverse[note],
+        "url": url,
+    };
+}
+
+enum Note {
+    TL_DR_LEGAL,
+    WIKIPEDIA_PAGE,
+    OSI_PAGE,
+    NOTE_WIKIPEDIA_PAGE,
+    MOZILLA_PAGE
+}
+
+final noteValues = EnumValues({
+    "tl;dr legal": Note.TL_DR_LEGAL,
+    "Wikipedia page": Note.WIKIPEDIA_PAGE,
+    "OSI Page": Note.OSI_PAGE,
+    "Wikipedia Page": Note.NOTE_WIKIPEDIA_PAGE,
+    "Mozilla Page": Note.MOZILLA_PAGE
+});
+
+class OtherName {
+    final String name;
+    final String? note;
+
+    OtherName({
+        required this.name,
+        required this.note,
+    });
+
+    factory OtherName.fromJson(Map<String, dynamic> json) => OtherName(
+        name: json["name"],
+        note: json["note"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "note": note,
+    };
+}
+
+class Text {
+    final MediaType mediaType;
+    final Title title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: mediaTypeValues.map[json["media_type"]]!,
+        title: titleValues.map[json["title"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaTypeValues.reverse[mediaType],
+        "title": titleValues.reverse[title],
+        "url": url,
+    };
+}
+
+enum MediaType {
+    TEXT_HTML,
+    TEXT_PLAIN
+}
+
+final mediaTypeValues = EnumValues({
+    "text/html": MediaType.TEXT_HTML,
+    "text/plain": MediaType.TEXT_PLAIN
+});
+
+enum Title {
+    HTML,
+    PLAIN_TEXT
+}
+
+final titleValues = EnumValues({
+    "HTML": Title.HTML,
+    "Plain Text": Title.PLAIN_TEXT
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/06bee.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/06bee.json/default/TopLevel.dart
new file mode 100644
index 0000000..de07673
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/06bee.json/default/TopLevel.dart
@@ -0,0 +1,177 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final dynamic supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    SPDX,
+    TROVE,
+    DEP5
+}
+
+final schemeValues = EnumValues({
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE,
+    "DEP5": Scheme.DEP5
+});
+
+enum Keyword {
+    DISCOURAGED,
+    NON_REUSABLE,
+    OSI_APPROVED
+}
+
+final keywordValues = EnumValues({
+    "discouraged": Keyword.DISCOURAGED,
+    "non-reusable": Keyword.NON_REUSABLE,
+    "osi-approved": Keyword.OSI_APPROVED
+});
+
+class Link {
+    final Note note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: noteValues.map[json["note"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": noteValues.reverse[note],
+        "url": url,
+    };
+}
+
+enum Note {
+    OSI_PAGE
+}
+
+final noteValues = EnumValues({
+    "OSI Page": Note.OSI_PAGE
+});
+
+class Text {
+    final MediaType mediaType;
+    final Title title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: mediaTypeValues.map[json["media_type"]]!,
+        title: titleValues.map[json["title"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaTypeValues.reverse[mediaType],
+        "title": titleValues.reverse[title],
+        "url": url,
+    };
+}
+
+enum MediaType {
+    TEXT_HTML
+}
+
+final mediaTypeValues = EnumValues({
+    "text/html": MediaType.TEXT_HTML
+});
+
+enum Title {
+    HTML
+}
+
+final titleValues = EnumValues({
+    "HTML": Title.HTML
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/07540.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/07540.json/default/TopLevel.dart
new file mode 100644
index 0000000..63b0fdf
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/07540.json/default/TopLevel.dart
@@ -0,0 +1,35 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Cookies cookies;
+
+    TopLevel({
+        required this.cookies,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        cookies: Cookies.fromJson(json["cookies"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cookies": cookies.toJson(),
+    };
+}
+
+class Cookies {
+    Cookies();
+
+    factory Cookies.fromJson(Map<String, dynamic> json) => Cookies(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/0779f.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0779f.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0779f.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/07c75.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/07c75.json/default/TopLevel.dart
new file mode 100644
index 0000000..19013c5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/07c75.json/default/TopLevel.dart
@@ -0,0 +1,117 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<String> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final dynamic supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<String>.from(json["keywords"].map((x) => x)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => x)),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final String scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: json["scheme"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": scheme,
+    };
+}
+
+class Link {
+    final String note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: json["note"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": note,
+        "url": url,
+    };
+}
+
+class Text {
+    final String mediaType;
+    final String title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: json["media_type"],
+        title: json["title"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaType,
+        "title": title,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/09f54.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/09f54.json/default/TopLevel.dart
new file mode 100644
index 0000000..03bbd3d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/09f54.json/default/TopLevel.dart
@@ -0,0 +1,77 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Map<String, Datum> data;
+    final Description description;
+
+    TopLevel({
+        required this.data,
+        required this.description,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: Map.from(json["data"]).map((k, v) => MapEntry<String, Datum>(k, Datum.fromJson(v))),
+        description: Description.fromJson(json["description"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": Map.from(data).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "description": description.toJson(),
+    };
+}
+
+class Datum {
+    final String anomaly;
+    final String value;
+
+    Datum({
+        required this.anomaly,
+        required this.value,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        anomaly: json["anomaly"],
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "anomaly": anomaly,
+        "value": value,
+    };
+}
+
+class Description {
+    final String basePeriod;
+    final int missing;
+    final String title;
+    final String units;
+
+    Description({
+        required this.basePeriod,
+        required this.missing,
+        required this.title,
+        required this.units,
+    });
+
+    factory Description.fromJson(Map<String, dynamic> json) => Description(
+        basePeriod: json["base_period"],
+        missing: json["missing"],
+        title: json["title"],
+        units: json["units"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base_period": basePeriod,
+        "missing": missing,
+        "title": title,
+        "units": units,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart
new file mode 100644
index 0000000..0b5e83a
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart
@@ -0,0 +1,95 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final String next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final String code;
+    final DateTime createdAt;
+    final int id;
+    final String name;
+    final DateTime updatedAt;
+    final String uri;
+
+    Result({
+        required this.code,
+        required this.createdAt,
+        required this.id,
+        required this.name,
+        required this.updatedAt,
+        required this.uri,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        code: json["code"],
+        createdAt: DateTime.parse(json["created_at"]),
+        id: json["id"],
+        name: json["name"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "created_at": createdAt.toIso8601String(),
+        "id": id,
+        "name": name,
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart
new file mode 100644
index 0000000..2ea24e0
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart
@@ -0,0 +1,897 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final Actor actor;
+    final DateTime createdAt;
+    final String id;
+    final Actor? org;
+    final Payload payload;
+    final bool public;
+    final TopLevelRepo repo;
+    final Type type;
+
+    TopLevel({
+        required this.actor,
+        required this.createdAt,
+        required this.id,
+        this.org,
+        required this.payload,
+        required this.public,
+        required this.repo,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        actor: Actor.fromJson(json["actor"]),
+        createdAt: DateTime.parse(json["created_at"]),
+        id: json["id"],
+        org: json["org"] == null ? null : Actor.fromJson(json["org"]),
+        payload: Payload.fromJson(json["payload"]),
+        public: json["public"],
+        repo: TopLevelRepo.fromJson(json["repo"]),
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "actor": actor.toJson(),
+        "created_at": createdAt.toIso8601String(),
+        "id": id,
+        "org": org?.toJson(),
+        "payload": payload.toJson(),
+        "public": public,
+        "repo": repo.toJson(),
+        "type": typeValues.reverse[type],
+    };
+}
+
+class Actor {
+    final String avatarUrl;
+    final String? displayLogin;
+    final String gravatarId;
+    final int id;
+    final String login;
+    final String url;
+
+    Actor({
+        required this.avatarUrl,
+        this.displayLogin,
+        required this.gravatarId,
+        required this.id,
+        required this.login,
+        required this.url,
+    });
+
+    factory Actor.fromJson(Map<String, dynamic> json) => Actor(
+        avatarUrl: json["avatar_url"],
+        displayLogin: json["display_login"],
+        gravatarId: json["gravatar_id"],
+        id: json["id"],
+        login: json["login"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "display_login": displayLogin,
+        "gravatar_id": gravatarId,
+        "id": id,
+        "login": login,
+        "url": url,
+    };
+}
+
+class Payload {
+    final String? action;
+    final String? before;
+    final List<Commit>? commits;
+    final String? description;
+    final int? distinctSize;
+    final String? head;
+    final String? masterBranch;
+    final int? number;
+    final PullRequest? pullRequest;
+    final int? pushId;
+    final String? pusherType;
+    final String? ref;
+    final String? refType;
+    final int? size;
+
+    Payload({
+        this.action,
+        this.before,
+        this.commits,
+        this.description,
+        this.distinctSize,
+        this.head,
+        this.masterBranch,
+        this.number,
+        this.pullRequest,
+        this.pushId,
+        this.pusherType,
+        this.ref,
+        this.refType,
+        this.size,
+    });
+
+    factory Payload.fromJson(Map<String, dynamic> json) => Payload(
+        action: json["action"],
+        before: json["before"],
+        commits: json["commits"] == null ? null : List<Commit>.from(json["commits"]!.map((x) => Commit.fromJson(x))),
+        description: json["description"],
+        distinctSize: json["distinct_size"],
+        head: json["head"],
+        masterBranch: json["master_branch"],
+        number: json["number"],
+        pullRequest: json["pull_request"] == null ? null : PullRequest.fromJson(json["pull_request"]),
+        pushId: json["push_id"],
+        pusherType: json["pusher_type"],
+        ref: json["ref"],
+        refType: json["ref_type"],
+        size: json["size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "action": action,
+        "before": before,
+        "commits": commits == null ? null : List<dynamic>.from(commits!.map((x) => x.toJson())),
+        "description": description,
+        "distinct_size": distinctSize,
+        "head": head,
+        "master_branch": masterBranch,
+        "number": number,
+        "pull_request": pullRequest?.toJson(),
+        "push_id": pushId,
+        "pusher_type": pusherType,
+        "ref": ref,
+        "ref_type": refType,
+        "size": size,
+    };
+}
+
+class Commit {
+    final Author author;
+    final bool distinct;
+    final String message;
+    final String sha;
+    final String url;
+
+    Commit({
+        required this.author,
+        required this.distinct,
+        required this.message,
+        required this.sha,
+        required this.url,
+    });
+
+    factory Commit.fromJson(Map<String, dynamic> json) => Commit(
+        author: Author.fromJson(json["author"]),
+        distinct: json["distinct"],
+        message: json["message"],
+        sha: json["sha"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "author": author.toJson(),
+        "distinct": distinct,
+        "message": message,
+        "sha": sha,
+        "url": url,
+    };
+}
+
+class Author {
+    final String email;
+    final String name;
+
+    Author({
+        required this.email,
+        required this.name,
+    });
+
+    factory Author.fromJson(Map<String, dynamic> json) => Author(
+        email: json["email"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "email": email,
+        "name": name,
+    };
+}
+
+class PullRequest {
+    final int additions;
+    final dynamic assignee;
+    final List<dynamic> assignees;
+    final Base base;
+    final String body;
+    final int changedFiles;
+    final DateTime closedAt;
+    final int comments;
+    final String commentsUrl;
+    final int commits;
+    final String commitsUrl;
+    final DateTime createdAt;
+    final int deletions;
+    final String diffUrl;
+    final Base head;
+    final String htmlUrl;
+    final int id;
+    final String issueUrl;
+    final Links links;
+    final bool locked;
+    final bool maintainerCanModify;
+    final String mergeCommitSha;
+    final dynamic mergeable;
+    final String mergeableState;
+    final bool merged;
+    final DateTime mergedAt;
+    final MergedBy mergedBy;
+    final dynamic milestone;
+    final int number;
+    final String patchUrl;
+    final dynamic rebaseable;
+    final List<dynamic> requestedReviewers;
+    final String reviewCommentUrl;
+    final int reviewComments;
+    final String reviewCommentsUrl;
+    final String state;
+    final String statusesUrl;
+    final String title;
+    final DateTime updatedAt;
+    final String url;
+    final MergedBy user;
+
+    PullRequest({
+        required this.additions,
+        required this.assignee,
+        required this.assignees,
+        required this.base,
+        required this.body,
+        required this.changedFiles,
+        required this.closedAt,
+        required this.comments,
+        required this.commentsUrl,
+        required this.commits,
+        required this.commitsUrl,
+        required this.createdAt,
+        required this.deletions,
+        required this.diffUrl,
+        required this.head,
+        required this.htmlUrl,
+        required this.id,
+        required this.issueUrl,
+        required this.links,
+        required this.locked,
+        required this.maintainerCanModify,
+        required this.mergeCommitSha,
+        required this.mergeable,
+        required this.mergeableState,
+        required this.merged,
+        required this.mergedAt,
+        required this.mergedBy,
+        required this.milestone,
+        required this.number,
+        required this.patchUrl,
+        required this.rebaseable,
+        required this.requestedReviewers,
+        required this.reviewCommentUrl,
+        required this.reviewComments,
+        required this.reviewCommentsUrl,
+        required this.state,
+        required this.statusesUrl,
+        required this.title,
+        required this.updatedAt,
+        required this.url,
+        required this.user,
+    });
+
+    factory PullRequest.fromJson(Map<String, dynamic> json) => PullRequest(
+        additions: json["additions"],
+        assignee: json["assignee"],
+        assignees: List<dynamic>.from(json["assignees"].map((x) => x)),
+        base: Base.fromJson(json["base"]),
+        body: json["body"],
+        changedFiles: json["changed_files"],
+        closedAt: DateTime.parse(json["closed_at"]),
+        comments: json["comments"],
+        commentsUrl: json["comments_url"],
+        commits: json["commits"],
+        commitsUrl: json["commits_url"],
+        createdAt: DateTime.parse(json["created_at"]),
+        deletions: json["deletions"],
+        diffUrl: json["diff_url"],
+        head: Base.fromJson(json["head"]),
+        htmlUrl: json["html_url"],
+        id: json["id"],
+        issueUrl: json["issue_url"],
+        links: Links.fromJson(json["_links"]),
+        locked: json["locked"],
+        maintainerCanModify: json["maintainer_can_modify"],
+        mergeCommitSha: json["merge_commit_sha"],
+        mergeable: json["mergeable"],
+        mergeableState: json["mergeable_state"],
+        merged: json["merged"],
+        mergedAt: DateTime.parse(json["merged_at"]),
+        mergedBy: MergedBy.fromJson(json["merged_by"]),
+        milestone: json["milestone"],
+        number: json["number"],
+        patchUrl: json["patch_url"],
+        rebaseable: json["rebaseable"],
+        requestedReviewers: List<dynamic>.from(json["requested_reviewers"].map((x) => x)),
+        reviewCommentUrl: json["review_comment_url"],
+        reviewComments: json["review_comments"],
+        reviewCommentsUrl: json["review_comments_url"],
+        state: json["state"],
+        statusesUrl: json["statuses_url"],
+        title: json["title"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        url: json["url"],
+        user: MergedBy.fromJson(json["user"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "additions": additions,
+        "assignee": assignee,
+        "assignees": List<dynamic>.from(assignees.map((x) => x)),
+        "base": base.toJson(),
+        "body": body,
+        "changed_files": changedFiles,
+        "closed_at": closedAt.toIso8601String(),
+        "comments": comments,
+        "comments_url": commentsUrl,
+        "commits": commits,
+        "commits_url": commitsUrl,
+        "created_at": createdAt.toIso8601String(),
+        "deletions": deletions,
+        "diff_url": diffUrl,
+        "head": head.toJson(),
+        "html_url": htmlUrl,
+        "id": id,
+        "issue_url": issueUrl,
+        "_links": links.toJson(),
+        "locked": locked,
+        "maintainer_can_modify": maintainerCanModify,
+        "merge_commit_sha": mergeCommitSha,
+        "mergeable": mergeable,
+        "mergeable_state": mergeableState,
+        "merged": merged,
+        "merged_at": mergedAt.toIso8601String(),
+        "merged_by": mergedBy.toJson(),
+        "milestone": milestone,
+        "number": number,
+        "patch_url": patchUrl,
+        "rebaseable": rebaseable,
+        "requested_reviewers": List<dynamic>.from(requestedReviewers.map((x) => x)),
+        "review_comment_url": reviewCommentUrl,
+        "review_comments": reviewComments,
+        "review_comments_url": reviewCommentsUrl,
+        "state": state,
+        "statuses_url": statusesUrl,
+        "title": title,
+        "updated_at": updatedAt.toIso8601String(),
+        "url": url,
+        "user": user.toJson(),
+    };
+}
+
+class Base {
+    final String label;
+    final String ref;
+    final BaseRepo repo;
+    final String sha;
+    final MergedBy user;
+
+    Base({
+        required this.label,
+        required this.ref,
+        required this.repo,
+        required this.sha,
+        required this.user,
+    });
+
+    factory Base.fromJson(Map<String, dynamic> json) => Base(
+        label: json["label"],
+        ref: json["ref"],
+        repo: BaseRepo.fromJson(json["repo"]),
+        sha: json["sha"],
+        user: MergedBy.fromJson(json["user"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "label": label,
+        "ref": ref,
+        "repo": repo.toJson(),
+        "sha": sha,
+        "user": user.toJson(),
+    };
+}
+
+class BaseRepo {
+    final String archiveUrl;
+    final String assigneesUrl;
+    final String blobsUrl;
+    final String branchesUrl;
+    final String cloneUrl;
+    final String collaboratorsUrl;
+    final String commentsUrl;
+    final String commitsUrl;
+    final String compareUrl;
+    final String contentsUrl;
+    final String contributorsUrl;
+    final DateTime createdAt;
+    final String defaultBranch;
+    final String deploymentsUrl;
+    final dynamic description;
+    final String downloadsUrl;
+    final String eventsUrl;
+    final bool fork;
+    final int forks;
+    final int forksCount;
+    final String forksUrl;
+    final String fullName;
+    final String gitCommitsUrl;
+    final String gitRefsUrl;
+    final String gitTagsUrl;
+    final String gitUrl;
+    final bool hasDownloads;
+    final bool hasIssues;
+    final bool hasPages;
+    final bool hasProjects;
+    final bool hasWiki;
+    final dynamic homepage;
+    final String hooksUrl;
+    final String htmlUrl;
+    final int id;
+    final String issueCommentUrl;
+    final String issueEventsUrl;
+    final String issuesUrl;
+    final String keysUrl;
+    final String labelsUrl;
+    final String language;
+    final String languagesUrl;
+    final String mergesUrl;
+    final String milestonesUrl;
+    final dynamic mirrorUrl;
+    final String name;
+    final String notificationsUrl;
+    final int openIssues;
+    final int openIssuesCount;
+    final MergedBy owner;
+    final bool private;
+    final String pullsUrl;
+    final DateTime pushedAt;
+    final String releasesUrl;
+    final int size;
+    final String sshUrl;
+    final int stargazersCount;
+    final String stargazersUrl;
+    final String statusesUrl;
+    final String subscribersUrl;
+    final String subscriptionUrl;
+    final String svnUrl;
+    final String tagsUrl;
+    final String teamsUrl;
+    final String treesUrl;
+    final DateTime updatedAt;
+    final String url;
+    final int watchers;
+    final int watchersCount;
+
+    BaseRepo({
+        required this.archiveUrl,
+        required this.assigneesUrl,
+        required this.blobsUrl,
+        required this.branchesUrl,
+        required this.cloneUrl,
+        required this.collaboratorsUrl,
+        required this.commentsUrl,
+        required this.commitsUrl,
+        required this.compareUrl,
+        required this.contentsUrl,
+        required this.contributorsUrl,
+        required this.createdAt,
+        required this.defaultBranch,
+        required this.deploymentsUrl,
+        required this.description,
+        required this.downloadsUrl,
+        required this.eventsUrl,
+        required this.fork,
+        required this.forks,
+        required this.forksCount,
+        required this.forksUrl,
+        required this.fullName,
+        required this.gitCommitsUrl,
+        required this.gitRefsUrl,
+        required this.gitTagsUrl,
+        required this.gitUrl,
+        required this.hasDownloads,
+        required this.hasIssues,
+        required this.hasPages,
+        required this.hasProjects,
+        required this.hasWiki,
+        required this.homepage,
+        required this.hooksUrl,
+        required this.htmlUrl,
+        required this.id,
+        required this.issueCommentUrl,
+        required this.issueEventsUrl,
+        required this.issuesUrl,
+        required this.keysUrl,
+        required this.labelsUrl,
+        required this.language,
+        required this.languagesUrl,
+        required this.mergesUrl,
+        required this.milestonesUrl,
+        required this.mirrorUrl,
+        required this.name,
+        required this.notificationsUrl,
+        required this.openIssues,
+        required this.openIssuesCount,
+        required this.owner,
+        required this.private,
+        required this.pullsUrl,
+        required this.pushedAt,
+        required this.releasesUrl,
+        required this.size,
+        required this.sshUrl,
+        required this.stargazersCount,
+        required this.stargazersUrl,
+        required this.statusesUrl,
+        required this.subscribersUrl,
+        required this.subscriptionUrl,
+        required this.svnUrl,
+        required this.tagsUrl,
+        required this.teamsUrl,
+        required this.treesUrl,
+        required this.updatedAt,
+        required this.url,
+        required this.watchers,
+        required this.watchersCount,
+    });
+
+    factory BaseRepo.fromJson(Map<String, dynamic> json) => BaseRepo(
+        archiveUrl: json["archive_url"],
+        assigneesUrl: json["assignees_url"],
+        blobsUrl: json["blobs_url"],
+        branchesUrl: json["branches_url"],
+        cloneUrl: json["clone_url"],
+        collaboratorsUrl: json["collaborators_url"],
+        commentsUrl: json["comments_url"],
+        commitsUrl: json["commits_url"],
+        compareUrl: json["compare_url"],
+        contentsUrl: json["contents_url"],
+        contributorsUrl: json["contributors_url"],
+        createdAt: DateTime.parse(json["created_at"]),
+        defaultBranch: json["default_branch"],
+        deploymentsUrl: json["deployments_url"],
+        description: json["description"],
+        downloadsUrl: json["downloads_url"],
+        eventsUrl: json["events_url"],
+        fork: json["fork"],
+        forks: json["forks"],
+        forksCount: json["forks_count"],
+        forksUrl: json["forks_url"],
+        fullName: json["full_name"],
+        gitCommitsUrl: json["git_commits_url"],
+        gitRefsUrl: json["git_refs_url"],
+        gitTagsUrl: json["git_tags_url"],
+        gitUrl: json["git_url"],
+        hasDownloads: json["has_downloads"],
+        hasIssues: json["has_issues"],
+        hasPages: json["has_pages"],
+        hasProjects: json["has_projects"],
+        hasWiki: json["has_wiki"],
+        homepage: json["homepage"],
+        hooksUrl: json["hooks_url"],
+        htmlUrl: json["html_url"],
+        id: json["id"],
+        issueCommentUrl: json["issue_comment_url"],
+        issueEventsUrl: json["issue_events_url"],
+        issuesUrl: json["issues_url"],
+        keysUrl: json["keys_url"],
+        labelsUrl: json["labels_url"],
+        language: json["language"],
+        languagesUrl: json["languages_url"],
+        mergesUrl: json["merges_url"],
+        milestonesUrl: json["milestones_url"],
+        mirrorUrl: json["mirror_url"],
+        name: json["name"],
+        notificationsUrl: json["notifications_url"],
+        openIssues: json["open_issues"],
+        openIssuesCount: json["open_issues_count"],
+        owner: MergedBy.fromJson(json["owner"]),
+        private: json["private"],
+        pullsUrl: json["pulls_url"],
+        pushedAt: DateTime.parse(json["pushed_at"]),
+        releasesUrl: json["releases_url"],
+        size: json["size"],
+        sshUrl: json["ssh_url"],
+        stargazersCount: json["stargazers_count"],
+        stargazersUrl: json["stargazers_url"],
+        statusesUrl: json["statuses_url"],
+        subscribersUrl: json["subscribers_url"],
+        subscriptionUrl: json["subscription_url"],
+        svnUrl: json["svn_url"],
+        tagsUrl: json["tags_url"],
+        teamsUrl: json["teams_url"],
+        treesUrl: json["trees_url"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        url: json["url"],
+        watchers: json["watchers"],
+        watchersCount: json["watchers_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "archive_url": archiveUrl,
+        "assignees_url": assigneesUrl,
+        "blobs_url": blobsUrl,
+        "branches_url": branchesUrl,
+        "clone_url": cloneUrl,
+        "collaborators_url": collaboratorsUrl,
+        "comments_url": commentsUrl,
+        "commits_url": commitsUrl,
+        "compare_url": compareUrl,
+        "contents_url": contentsUrl,
+        "contributors_url": contributorsUrl,
+        "created_at": createdAt.toIso8601String(),
+        "default_branch": defaultBranch,
+        "deployments_url": deploymentsUrl,
+        "description": description,
+        "downloads_url": downloadsUrl,
+        "events_url": eventsUrl,
+        "fork": fork,
+        "forks": forks,
+        "forks_count": forksCount,
+        "forks_url": forksUrl,
+        "full_name": fullName,
+        "git_commits_url": gitCommitsUrl,
+        "git_refs_url": gitRefsUrl,
+        "git_tags_url": gitTagsUrl,
+        "git_url": gitUrl,
+        "has_downloads": hasDownloads,
+        "has_issues": hasIssues,
+        "has_pages": hasPages,
+        "has_projects": hasProjects,
+        "has_wiki": hasWiki,
+        "homepage": homepage,
+        "hooks_url": hooksUrl,
+        "html_url": htmlUrl,
+        "id": id,
+        "issue_comment_url": issueCommentUrl,
+        "issue_events_url": issueEventsUrl,
+        "issues_url": issuesUrl,
+        "keys_url": keysUrl,
+        "labels_url": labelsUrl,
+        "language": language,
+        "languages_url": languagesUrl,
+        "merges_url": mergesUrl,
+        "milestones_url": milestonesUrl,
+        "mirror_url": mirrorUrl,
+        "name": name,
+        "notifications_url": notificationsUrl,
+        "open_issues": openIssues,
+        "open_issues_count": openIssuesCount,
+        "owner": owner.toJson(),
+        "private": private,
+        "pulls_url": pullsUrl,
+        "pushed_at": pushedAt.toIso8601String(),
+        "releases_url": releasesUrl,
+        "size": size,
+        "ssh_url": sshUrl,
+        "stargazers_count": stargazersCount,
+        "stargazers_url": stargazersUrl,
+        "statuses_url": statusesUrl,
+        "subscribers_url": subscribersUrl,
+        "subscription_url": subscriptionUrl,
+        "svn_url": svnUrl,
+        "tags_url": tagsUrl,
+        "teams_url": teamsUrl,
+        "trees_url": treesUrl,
+        "updated_at": updatedAt.toIso8601String(),
+        "url": url,
+        "watchers": watchers,
+        "watchers_count": watchersCount,
+    };
+}
+
+class MergedBy {
+    final String avatarUrl;
+    final String eventsUrl;
+    final String followersUrl;
+    final String followingUrl;
+    final String gistsUrl;
+    final String gravatarId;
+    final String htmlUrl;
+    final int id;
+    final String login;
+    final String organizationsUrl;
+    final String receivedEventsUrl;
+    final String reposUrl;
+    final bool siteAdmin;
+    final String starredUrl;
+    final String subscriptionsUrl;
+    final String type;
+    final String url;
+
+    MergedBy({
+        required this.avatarUrl,
+        required this.eventsUrl,
+        required this.followersUrl,
+        required this.followingUrl,
+        required this.gistsUrl,
+        required this.gravatarId,
+        required this.htmlUrl,
+        required this.id,
+        required this.login,
+        required this.organizationsUrl,
+        required this.receivedEventsUrl,
+        required this.reposUrl,
+        required this.siteAdmin,
+        required this.starredUrl,
+        required this.subscriptionsUrl,
+        required this.type,
+        required this.url,
+    });
+
+    factory MergedBy.fromJson(Map<String, dynamic> json) => MergedBy(
+        avatarUrl: json["avatar_url"],
+        eventsUrl: json["events_url"],
+        followersUrl: json["followers_url"],
+        followingUrl: json["following_url"],
+        gistsUrl: json["gists_url"],
+        gravatarId: json["gravatar_id"],
+        htmlUrl: json["html_url"],
+        id: json["id"],
+        login: json["login"],
+        organizationsUrl: json["organizations_url"],
+        receivedEventsUrl: json["received_events_url"],
+        reposUrl: json["repos_url"],
+        siteAdmin: json["site_admin"],
+        starredUrl: json["starred_url"],
+        subscriptionsUrl: json["subscriptions_url"],
+        type: json["type"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "events_url": eventsUrl,
+        "followers_url": followersUrl,
+        "following_url": followingUrl,
+        "gists_url": gistsUrl,
+        "gravatar_id": gravatarId,
+        "html_url": htmlUrl,
+        "id": id,
+        "login": login,
+        "organizations_url": organizationsUrl,
+        "received_events_url": receivedEventsUrl,
+        "repos_url": reposUrl,
+        "site_admin": siteAdmin,
+        "starred_url": starredUrl,
+        "subscriptions_url": subscriptionsUrl,
+        "type": type,
+        "url": url,
+    };
+}
+
+class Links {
+    final Comments comments;
+    final Comments commits;
+    final Comments html;
+    final Comments issue;
+    final Comments reviewComment;
+    final Comments reviewComments;
+    final Comments self;
+    final Comments statuses;
+
+    Links({
+        required this.comments,
+        required this.commits,
+        required this.html,
+        required this.issue,
+        required this.reviewComment,
+        required this.reviewComments,
+        required this.self,
+        required this.statuses,
+    });
+
+    factory Links.fromJson(Map<String, dynamic> json) => Links(
+        comments: Comments.fromJson(json["comments"]),
+        commits: Comments.fromJson(json["commits"]),
+        html: Comments.fromJson(json["html"]),
+        issue: Comments.fromJson(json["issue"]),
+        reviewComment: Comments.fromJson(json["review_comment"]),
+        reviewComments: Comments.fromJson(json["review_comments"]),
+        self: Comments.fromJson(json["self"]),
+        statuses: Comments.fromJson(json["statuses"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "comments": comments.toJson(),
+        "commits": commits.toJson(),
+        "html": html.toJson(),
+        "issue": issue.toJson(),
+        "review_comment": reviewComment.toJson(),
+        "review_comments": reviewComments.toJson(),
+        "self": self.toJson(),
+        "statuses": statuses.toJson(),
+    };
+}
+
+class Comments {
+    final String href;
+
+    Comments({
+        required this.href,
+    });
+
+    factory Comments.fromJson(Map<String, dynamic> json) => Comments(
+        href: json["href"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "href": href,
+    };
+}
+
+class TopLevelRepo {
+    final int id;
+    final String name;
+    final String url;
+
+    TopLevelRepo({
+        required this.id,
+        required this.name,
+        required this.url,
+    });
+
+    factory TopLevelRepo.fromJson(Map<String, dynamic> json) => TopLevelRepo(
+        id: json["id"],
+        name: json["name"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "name": name,
+        "url": url,
+    };
+}
+
+enum Type {
+    PUSH_EVENT,
+    CREATE_EVENT,
+    WATCH_EVENT,
+    PULL_REQUEST_EVENT,
+    DELETE_EVENT
+}
+
+final typeValues = EnumValues({
+    "PushEvent": Type.PUSH_EVENT,
+    "CreateEvent": Type.CREATE_EVENT,
+    "WatchEvent": Type.WATCH_EVENT,
+    "PullRequestEvent": Type.PULL_REQUEST_EVENT,
+    "DeleteEvent": Type.DELETE_EVENT
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/0b91a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0b91a.json/default/TopLevel.dart
new file mode 100644
index 0000000..0d4cf21
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0b91a.json/default/TopLevel.dart
@@ -0,0 +1,185 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Metadata metadata;
+    final List<Result> results;
+
+    TopLevel({
+        required this.metadata,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        metadata: Metadata.fromJson(json["metadata"]),
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "metadata": metadata.toJson(),
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Metadata {
+    final double executionTime;
+    final ResponseInfo responseInfo;
+    final Resultset resultset;
+
+    Metadata({
+        required this.executionTime,
+        required this.responseInfo,
+        required this.resultset,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        executionTime: json["executionTime"]?.toDouble(),
+        responseInfo: ResponseInfo.fromJson(json["responseInfo"]),
+        resultset: Resultset.fromJson(json["resultset"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "executionTime": executionTime,
+        "responseInfo": responseInfo.toJson(),
+        "resultset": resultset.toJson(),
+    };
+}
+
+class ResponseInfo {
+    final String developerMessage;
+    final int status;
+
+    ResponseInfo({
+        required this.developerMessage,
+        required this.status,
+    });
+
+    factory ResponseInfo.fromJson(Map<String, dynamic> json) => ResponseInfo(
+        developerMessage: json["developerMessage"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "developerMessage": developerMessage,
+        "status": status,
+    };
+}
+
+class Resultset {
+    final int count;
+    final int page;
+    final int pagesize;
+
+    Resultset({
+        required this.count,
+        required this.page,
+        required this.pagesize,
+    });
+
+    factory Resultset.fromJson(Map<String, dynamic> json) => Resultset(
+        count: json["count"],
+        page: json["page"],
+        pagesize: json["pagesize"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "page": page,
+        "pagesize": pagesize,
+    };
+}
+
+class Result {
+    final List<dynamic> attachment;
+    final String body;
+    final String changed;
+    final List<Component> component;
+    final String created;
+    final String date;
+    final List<dynamic> image;
+    final dynamic number;
+    final dynamic teaser;
+    final String title;
+    final List<dynamic> topic;
+    final String url;
+    final String uuid;
+    final String vuuid;
+
+    Result({
+        required this.attachment,
+        required this.body,
+        required this.changed,
+        required this.component,
+        required this.created,
+        required this.date,
+        required this.image,
+        required this.number,
+        required this.teaser,
+        required this.title,
+        required this.topic,
+        required this.url,
+        required this.uuid,
+        required this.vuuid,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        attachment: List<dynamic>.from(json["attachment"].map((x) => x)),
+        body: json["body"],
+        changed: json["changed"],
+        component: List<Component>.from(json["component"].map((x) => Component.fromJson(x))),
+        created: json["created"],
+        date: json["date"],
+        image: List<dynamic>.from(json["image"].map((x) => x)),
+        number: json["number"],
+        teaser: json["teaser"],
+        title: json["title"],
+        topic: List<dynamic>.from(json["topic"].map((x) => x)),
+        url: json["url"],
+        uuid: json["uuid"],
+        vuuid: json["vuuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachment": List<dynamic>.from(attachment.map((x) => x)),
+        "body": body,
+        "changed": changed,
+        "component": List<dynamic>.from(component.map((x) => x.toJson())),
+        "created": created,
+        "date": date,
+        "image": List<dynamic>.from(image.map((x) => x)),
+        "number": number,
+        "teaser": teaser,
+        "title": title,
+        "topic": List<dynamic>.from(topic.map((x) => x)),
+        "url": url,
+        "uuid": uuid,
+        "vuuid": vuuid,
+    };
+}
+
+class Component {
+    final String name;
+    final String uuid;
+
+    Component({
+        required this.name,
+        required this.uuid,
+    });
+
+    factory Component.fromJson(Map<String, dynamic> json) => Component(
+        name: json["name"],
+        uuid: json["uuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "uuid": uuid,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/0cffa.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0cffa.json/default/TopLevel.dart
new file mode 100644
index 0000000..4796771
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0cffa.json/default/TopLevel.dart
@@ -0,0 +1,477 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final Username username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": usernameValues.reverse[username],
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+    final Downsized? the480WStill;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+        this.the480WStill,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+        the480WStill: json["480w_still"] == null ? null : Downsized.fromJson(json["480w_still"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+        "480w_still": the480WStill?.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    G,
+    PG
+}
+
+final ratingValues = EnumValues({
+    "g": Rating.G,
+    "pg": Rating.PG
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String twitter;
+    final Username username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        required this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": usernameValues.reverse[username],
+    };
+}
+
+enum Username {
+    CHEEZBURGER,
+    EMPTY,
+    NATGEOWILD,
+    NOWTHIS
+}
+
+final usernameValues = EnumValues({
+    "cheezburger": Username.CHEEZBURGER,
+    "": Username.EMPTY,
+    "natgeowild": Username.NATGEOWILD,
+    "nowthis": Username.NOWTHIS
+});
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart
new file mode 100644
index 0000000..ed04a63
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart
@@ -0,0 +1,327 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final String next;
+    final dynamic previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.next,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        next: json["next"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "next": next,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Result {
+    final int activeScreens;
+    final List<Collection> collections;
+    final List<Detail> details;
+    final int duration;
+    final FavMovie favMovie;
+    final int id;
+    final List<Image> images;
+    final ResultLanguage language;
+    final DateTime releaseDate;
+    final int stars;
+    final List<dynamic>? tags;
+    final String title;
+    final List<Video> videos;
+    final VoteScore voteScore;
+    final int watches;
+
+    Result({
+        required this.activeScreens,
+        required this.collections,
+        required this.details,
+        required this.duration,
+        required this.favMovie,
+        required this.id,
+        required this.images,
+        required this.language,
+        required this.releaseDate,
+        required this.stars,
+        required this.tags,
+        required this.title,
+        required this.videos,
+        required this.voteScore,
+        required this.watches,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        activeScreens: json["active_screens"],
+        collections: List<Collection>.from(json["collections"].map((x) => Collection.fromJson(x))),
+        details: List<Detail>.from(json["details"].map((x) => Detail.fromJson(x))),
+        duration: json["duration"],
+        favMovie: FavMovie.fromJson(json["fav_movie"]),
+        id: json["id"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+        language: resultLanguageValues.map[json["language"]]!,
+        releaseDate: DateTime.parse(json["release_date"]),
+        stars: json["stars"],
+        tags: json["tags"] == null ? null : List<dynamic>.from(json["tags"]!.map((x) => x)),
+        title: json["title"],
+        videos: List<Video>.from(json["videos"].map((x) => Video.fromJson(x))),
+        voteScore: VoteScore.fromJson(json["vote_score"]),
+        watches: json["watches"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "active_screens": activeScreens,
+        "collections": List<dynamic>.from(collections.map((x) => x.toJson())),
+        "details": List<dynamic>.from(details.map((x) => x.toJson())),
+        "duration": duration,
+        "fav_movie": favMovie.toJson(),
+        "id": id,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+        "language": resultLanguageValues.reverse[language],
+        "release_date": "${releaseDate.year.toString().padLeft(4, '0')}-${releaseDate.month.toString().padLeft(2, '0')}-${releaseDate.day.toString().padLeft(2, '0')}",
+        "stars": stars,
+        "tags": tags == null ? null : List<dynamic>.from(tags!.map((x) => x)),
+        "title": title,
+        "videos": List<dynamic>.from(videos.map((x) => x.toJson())),
+        "vote_score": voteScore.toJson(),
+        "watches": watches,
+    };
+}
+
+class Collection {
+    final int id;
+    final List<int> movies;
+    final String name;
+    final String slug;
+
+    Collection({
+        required this.id,
+        required this.movies,
+        required this.name,
+        required this.slug,
+    });
+
+    factory Collection.fromJson(Map<String, dynamic> json) => Collection(
+        id: json["id"],
+        movies: List<int>.from(json["movies"].map((x) => x)),
+        name: json["name"],
+        slug: json["slug"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "movies": List<dynamic>.from(movies.map((x) => x)),
+        "name": name,
+        "slug": slug,
+    };
+}
+
+class Detail {
+    final String cast;
+    final String director;
+    final int id;
+    final DetailLanguage language;
+    final String storyline;
+    final String tagline;
+    final String title;
+
+    Detail({
+        required this.cast,
+        required this.director,
+        required this.id,
+        required this.language,
+        required this.storyline,
+        required this.tagline,
+        required this.title,
+    });
+
+    factory Detail.fromJson(Map<String, dynamic> json) => Detail(
+        cast: json["cast"],
+        director: json["director"],
+        id: json["id"],
+        language: detailLanguageValues.map[json["language"]]!,
+        storyline: json["storyline"],
+        tagline: json["tagline"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cast": cast,
+        "director": director,
+        "id": id,
+        "language": detailLanguageValues.reverse[language],
+        "storyline": storyline,
+        "tagline": tagline,
+        "title": title,
+    };
+}
+
+enum DetailLanguage {
+    EN,
+    TH
+}
+
+final detailLanguageValues = EnumValues({
+    "en": DetailLanguage.EN,
+    "th": DetailLanguage.TH
+});
+
+class FavMovie {
+    final bool follow;
+    final bool star;
+    final bool watched;
+
+    FavMovie({
+        required this.follow,
+        required this.star,
+        required this.watched,
+    });
+
+    factory FavMovie.fromJson(Map<String, dynamic> json) => FavMovie(
+        follow: json["follow"],
+        star: json["star"],
+        watched: json["watched"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "follow": follow,
+        "star": star,
+        "watched": watched,
+    };
+}
+
+class Image {
+    final int favs;
+    final int id;
+    final String thumbnail;
+    final Type type;
+    final String url;
+
+    Image({
+        required this.favs,
+        required this.id,
+        required this.thumbnail,
+        required this.type,
+        required this.url,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        favs: json["favs"],
+        id: json["id"],
+        thumbnail: json["thumbnail"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "favs": favs,
+        "id": id,
+        "thumbnail": thumbnail,
+        "type": typeValues.reverse[type],
+        "url": url,
+    };
+}
+
+enum Type {
+    POSTER,
+    BACKDROP
+}
+
+final typeValues = EnumValues({
+    "Poster": Type.POSTER,
+    "Backdrop": Type.BACKDROP
+});
+
+enum ResultLanguage {
+    EN,
+    EMPTY
+}
+
+final resultLanguageValues = EnumValues({
+    "en": ResultLanguage.EN,
+    "-": ResultLanguage.EMPTY
+});
+
+class Video {
+    final String kind;
+    final ResultLanguage language;
+    final String source;
+    final String url;
+
+    Video({
+        required this.kind,
+        required this.language,
+        required this.source,
+        required this.url,
+    });
+
+    factory Video.fromJson(Map<String, dynamic> json) => Video(
+        kind: json["kind"],
+        language: resultLanguageValues.map[json["language"]]!,
+        source: json["source"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "kind": kind,
+        "language": resultLanguageValues.reverse[language],
+        "source": source,
+        "url": url,
+    };
+}
+
+class VoteScore {
+    final int avg;
+    final int score;
+    final int total;
+
+    VoteScore({
+        required this.avg,
+        required this.score,
+        required this.total,
+    });
+
+    factory VoteScore.fromJson(Map<String, dynamic> json) => VoteScore(
+        avg: json["avg"],
+        score: json["score"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avg": avg,
+        "score": score,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/0fecf.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0fecf.json/default/TopLevel.dart
new file mode 100644
index 0000000..45adf7e
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/0fecf.json/default/TopLevel.dart
@@ -0,0 +1,25 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<String> countries;
+
+    TopLevel({
+        required this.countries,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        countries: List<String>.from(json["countries"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "countries": List<dynamic>.from(countries.map((x) => x)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/10be4.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/10be4.json/default/TopLevel.dart
new file mode 100644
index 0000000..7405e81
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/10be4.json/default/TopLevel.dart
@@ -0,0 +1,233 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<OtherName> otherNames;
+    final String? supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<OtherName>.from(json["other_names"].map((x) => OtherName.fromJson(x))),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x.toJson())),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    SPDX,
+    TROVE,
+    DEP5
+}
+
+final schemeValues = EnumValues({
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE,
+    "DEP5": Scheme.DEP5
+});
+
+enum Keyword {
+    OSI_APPROVED,
+    DISCOURAGED,
+    REDUNDANT,
+    MISCELLANEOUS,
+    NON_REUSABLE,
+    OBSOLETE,
+    POPULAR,
+    PERMISSIVE,
+    RETIRED,
+    SPECIAL_PURPOSE,
+    COPYLEFT,
+    INTERNATIONAL
+}
+
+final keywordValues = EnumValues({
+    "osi-approved": Keyword.OSI_APPROVED,
+    "discouraged": Keyword.DISCOURAGED,
+    "redundant": Keyword.REDUNDANT,
+    "miscellaneous": Keyword.MISCELLANEOUS,
+    "non-reusable": Keyword.NON_REUSABLE,
+    "obsolete": Keyword.OBSOLETE,
+    "popular": Keyword.POPULAR,
+    "permissive": Keyword.PERMISSIVE,
+    "retired": Keyword.RETIRED,
+    "special-purpose": Keyword.SPECIAL_PURPOSE,
+    "copyleft": Keyword.COPYLEFT,
+    "international": Keyword.INTERNATIONAL
+});
+
+class Link {
+    final Note note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: noteValues.map[json["note"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": noteValues.reverse[note],
+        "url": url,
+    };
+}
+
+enum Note {
+    OSI_PAGE,
+    TL_DR_LEGAL,
+    WIKIPEDIA_PAGE,
+    NOTE_WIKIPEDIA_PAGE,
+    MOZILLA_PAGE,
+    OSET_FOUNDATION_PAGE
+}
+
+final noteValues = EnumValues({
+    "OSI Page": Note.OSI_PAGE,
+    "tl;dr legal": Note.TL_DR_LEGAL,
+    "Wikipedia page": Note.WIKIPEDIA_PAGE,
+    "Wikipedia Page": Note.NOTE_WIKIPEDIA_PAGE,
+    "Mozilla Page": Note.MOZILLA_PAGE,
+    "OSET Foundation Page": Note.OSET_FOUNDATION_PAGE
+});
+
+class OtherName {
+    final String name;
+    final String? note;
+
+    OtherName({
+        required this.name,
+        required this.note,
+    });
+
+    factory OtherName.fromJson(Map<String, dynamic> json) => OtherName(
+        name: json["name"],
+        note: json["note"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "note": note,
+    };
+}
+
+class Text {
+    final MediaType mediaType;
+    final Title title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: mediaTypeValues.map[json["media_type"]]!,
+        title: titleValues.map[json["title"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaTypeValues.reverse[mediaType],
+        "title": titleValues.reverse[title],
+        "url": url,
+    };
+}
+
+enum MediaType {
+    TEXT_HTML,
+    TEXT_PLAIN,
+    APPLICATION_PDF
+}
+
+final mediaTypeValues = EnumValues({
+    "text/html": MediaType.TEXT_HTML,
+    "text/plain": MediaType.TEXT_PLAIN,
+    "application/pdf": MediaType.APPLICATION_PDF
+});
+
+enum Title {
+    HTML,
+    PLAIN_TEXT,
+    PDF
+}
+
+final titleValues = EnumValues({
+    "HTML": Title.HTML,
+    "Plain Text": Title.PLAIN_TEXT,
+    "PDF": Title.PDF
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/112b5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/112b5.json/default/TopLevel.dart
new file mode 100644
index 0000000..e9728af
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/112b5.json/default/TopLevel.dart
@@ -0,0 +1,75 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Args args;
+    final Headers headers;
+    final String origin;
+    final String url;
+
+    TopLevel({
+        required this.args,
+        required this.headers,
+        required this.origin,
+        required this.url,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        args: Args.fromJson(json["args"]),
+        headers: Headers.fromJson(json["headers"]),
+        origin: json["origin"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "args": args.toJson(),
+        "headers": headers.toJson(),
+        "origin": origin,
+        "url": url,
+    };
+}
+
+class Args {
+    Args();
+
+    factory Args.fromJson(Map<String, dynamic> json) => Args(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Headers {
+    final String acceptEncoding;
+    final String connection;
+    final String host;
+    final String userAgent;
+
+    Headers({
+        required this.acceptEncoding,
+        required this.connection,
+        required this.host,
+        required this.userAgent,
+    });
+
+    factory Headers.fromJson(Map<String, dynamic> json) => Headers(
+        acceptEncoding: json["Accept-Encoding"],
+        connection: json["Connection"],
+        host: json["Host"],
+        userAgent: json["User-Agent"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Accept-Encoding": acceptEncoding,
+        "Connection": connection,
+        "Host": host,
+        "User-Agent": userAgent,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/127a1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/127a1.json/default/TopLevel.dart
new file mode 100644
index 0000000..0afe479
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/127a1.json/default/TopLevel.dart
@@ -0,0 +1,475 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final Username username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": usernameValues.reverse[username],
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+    final Downsized? the480WStill;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+        this.the480WStill,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+        the480WStill: json["480w_still"] == null ? null : Downsized.fromJson(json["480w_still"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+        "480w_still": the480WStill?.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    G
+}
+
+final ratingValues = EnumValues({
+    "g": Rating.G
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String? twitter;
+    final Username username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": usernameValues.reverse[username],
+    };
+}
+
+enum Username {
+    EMPTY,
+    THEDAILYSHOW,
+    STUDIOSORIGINALS,
+    DISNEYZOOTOPIA
+}
+
+final usernameValues = EnumValues({
+    "": Username.EMPTY,
+    "thedailyshow": Username.THEDAILYSHOW,
+    "studiosoriginals": Username.STUDIOSORIGINALS,
+    "disneyzootopia": Username.DISNEYZOOTOPIA
+});
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/13d8d.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/13d8d.json/default/TopLevel.dart
new file mode 100644
index 0000000..f95350b
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/13d8d.json/default/TopLevel.dart
@@ -0,0 +1,121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String category;
+    final String context;
+    final int id;
+    final Location location;
+    final String locationSubtype;
+    final String locationType;
+    final String month;
+    final OutcomeStatus outcomeStatus;
+    final String persistentId;
+
+    TopLevel({
+        required this.category,
+        required this.context,
+        required this.id,
+        required this.location,
+        required this.locationSubtype,
+        required this.locationType,
+        required this.month,
+        required this.outcomeStatus,
+        required this.persistentId,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        category: json["category"],
+        context: json["context"],
+        id: json["id"],
+        location: Location.fromJson(json["location"]),
+        locationSubtype: json["location_subtype"],
+        locationType: json["location_type"],
+        month: json["month"],
+        outcomeStatus: OutcomeStatus.fromJson(json["outcome_status"]),
+        persistentId: json["persistent_id"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "category": category,
+        "context": context,
+        "id": id,
+        "location": location.toJson(),
+        "location_subtype": locationSubtype,
+        "location_type": locationType,
+        "month": month,
+        "outcome_status": outcomeStatus.toJson(),
+        "persistent_id": persistentId,
+    };
+}
+
+class Location {
+    final String latitude;
+    final String longitude;
+    final Street street;
+
+    Location({
+        required this.latitude,
+        required this.longitude,
+        required this.street,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        latitude: json["latitude"],
+        longitude: json["longitude"],
+        street: Street.fromJson(json["street"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "latitude": latitude,
+        "longitude": longitude,
+        "street": street.toJson(),
+    };
+}
+
+class Street {
+    final int id;
+    final String name;
+
+    Street({
+        required this.id,
+        required this.name,
+    });
+
+    factory Street.fromJson(Map<String, dynamic> json) => Street(
+        id: json["id"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "name": name,
+    };
+}
+
+class OutcomeStatus {
+    final String category;
+    final String date;
+
+    OutcomeStatus({
+        required this.category,
+        required this.date,
+    });
+
+    factory OutcomeStatus.fromJson(Map<String, dynamic> json) => OutcomeStatus(
+        category: json["category"],
+        date: json["date"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "category": category,
+        "date": date,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/14d38.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/14d38.json/default/TopLevel.dart
new file mode 100644
index 0000000..04e8e99
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/14d38.json/default/TopLevel.dart
@@ -0,0 +1,53 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Headers headers;
+
+    TopLevel({
+        required this.headers,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        headers: Headers.fromJson(json["headers"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "headers": headers.toJson(),
+    };
+}
+
+class Headers {
+    final String acceptEncoding;
+    final String connection;
+    final String host;
+    final String userAgent;
+
+    Headers({
+        required this.acceptEncoding,
+        required this.connection,
+        required this.host,
+        required this.userAgent,
+    });
+
+    factory Headers.fromJson(Map<String, dynamic> json) => Headers(
+        acceptEncoding: json["Accept-Encoding"],
+        connection: json["Connection"],
+        host: json["Host"],
+        userAgent: json["User-Agent"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Accept-Encoding": acceptEncoding,
+        "Connection": connection,
+        "Host": host,
+        "User-Agent": userAgent,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/176f1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/176f1.json/default/TopLevel.dart
new file mode 100644
index 0000000..2c2ac1d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/176f1.json/default/TopLevel.dart
@@ -0,0 +1,125 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<dynamic> message;
+    final int responseTime;
+    final Results results;
+    final String status;
+
+    TopLevel({
+        required this.message,
+        required this.responseTime,
+        required this.results,
+        required this.status,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        message: List<dynamic>.from(json["message"].map((x) => x)),
+        responseTime: json["responseTime"],
+        results: Results.fromJson(json["Results"]),
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "message": List<dynamic>.from(message.map((x) => x)),
+        "responseTime": responseTime,
+        "Results": results.toJson(),
+        "status": status,
+    };
+}
+
+class Results {
+    final List<Series> series;
+
+    Results({
+        required this.series,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        series: List<Series>.from(json["series"].map((x) => Series.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "series": List<dynamic>.from(series.map((x) => x.toJson())),
+    };
+}
+
+class Series {
+    final List<Datum> data;
+    final String seriesId;
+
+    Series({
+        required this.data,
+        required this.seriesId,
+    });
+
+    factory Series.fromJson(Map<String, dynamic> json) => Series(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        seriesId: json["seriesID"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "seriesID": seriesId,
+    };
+}
+
+class Datum {
+    final List<Footnote> footnotes;
+    final String period;
+    final String periodName;
+    final String value;
+    final String year;
+
+    Datum({
+        required this.footnotes,
+        required this.period,
+        required this.periodName,
+        required this.value,
+        required this.year,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        footnotes: List<Footnote>.from(json["footnotes"].map((x) => Footnote.fromJson(x))),
+        period: json["period"],
+        periodName: json["periodName"],
+        value: json["value"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "footnotes": List<dynamic>.from(footnotes.map((x) => x.toJson())),
+        "period": period,
+        "periodName": periodName,
+        "value": value,
+        "year": year,
+    };
+}
+
+class Footnote {
+    final String? code;
+    final String? text;
+
+    Footnote({
+        this.code,
+        this.text,
+    });
+
+    factory Footnote.fromJson(Map<String, dynamic> json) => Footnote(
+        code: json["code"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "text": text,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/1a7f5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/1a7f5.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/1a7f5.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart
new file mode 100644
index 0000000..e36f0ee
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart
@@ -0,0 +1,353 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Meta meta;
+    final List<Object> objects;
+
+    TopLevel({
+        required this.meta,
+        required this.objects,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        meta: Meta.fromJson(json["meta"]),
+        objects: List<Object>.from(json["objects"].map((x) => Object.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "objects": List<dynamic>.from(objects.map((x) => x.toJson())),
+    };
+}
+
+class Meta {
+    final int limit;
+    final int offset;
+    final int totalCount;
+
+    Meta({
+        required this.limit,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        limit: json["limit"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "limit": limit,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class Object {
+    final dynamic caucus;
+    final List<int> congressNumbers;
+    final bool current;
+    final String description;
+    final int district;
+    final DateTime enddate;
+    final Extra extra;
+    final int id;
+    final String? leadershipTitle;
+    final Party party;
+    final Person person;
+    final String phone;
+    final RoleType roleType;
+    final RoleTypeLabel roleTypeLabel;
+    final dynamic senatorClass;
+    final dynamic senatorRank;
+    final DateTime startdate;
+    final String state;
+    final Title title;
+    final RoleTypeLabel titleLong;
+    final String website;
+
+    Object({
+        required this.caucus,
+        required this.congressNumbers,
+        required this.current,
+        required this.description,
+        required this.district,
+        required this.enddate,
+        required this.extra,
+        required this.id,
+        required this.leadershipTitle,
+        required this.party,
+        required this.person,
+        required this.phone,
+        required this.roleType,
+        required this.roleTypeLabel,
+        required this.senatorClass,
+        required this.senatorRank,
+        required this.startdate,
+        required this.state,
+        required this.title,
+        required this.titleLong,
+        required this.website,
+    });
+
+    factory Object.fromJson(Map<String, dynamic> json) => Object(
+        caucus: json["caucus"],
+        congressNumbers: List<int>.from(json["congress_numbers"].map((x) => x)),
+        current: json["current"],
+        description: json["description"],
+        district: json["district"],
+        enddate: DateTime.parse(json["enddate"]),
+        extra: Extra.fromJson(json["extra"]),
+        id: json["id"],
+        leadershipTitle: json["leadership_title"],
+        party: partyValues.map[json["party"]]!,
+        person: Person.fromJson(json["person"]),
+        phone: json["phone"],
+        roleType: roleTypeValues.map[json["role_type"]]!,
+        roleTypeLabel: roleTypeLabelValues.map[json["role_type_label"]]!,
+        senatorClass: json["senator_class"],
+        senatorRank: json["senator_rank"],
+        startdate: DateTime.parse(json["startdate"]),
+        state: json["state"],
+        title: titleValues.map[json["title"]]!,
+        titleLong: roleTypeLabelValues.map[json["title_long"]]!,
+        website: json["website"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "caucus": caucus,
+        "congress_numbers": List<dynamic>.from(congressNumbers.map((x) => x)),
+        "current": current,
+        "description": description,
+        "district": district,
+        "enddate": "${enddate.year.toString().padLeft(4, '0')}-${enddate.month.toString().padLeft(2, '0')}-${enddate.day.toString().padLeft(2, '0')}",
+        "extra": extra.toJson(),
+        "id": id,
+        "leadership_title": leadershipTitle,
+        "party": partyValues.reverse[party],
+        "person": person.toJson(),
+        "phone": phone,
+        "role_type": roleTypeValues.reverse[roleType],
+        "role_type_label": roleTypeLabelValues.reverse[roleTypeLabel],
+        "senator_class": senatorClass,
+        "senator_rank": senatorRank,
+        "startdate": "${startdate.year.toString().padLeft(4, '0')}-${startdate.month.toString().padLeft(2, '0')}-${startdate.day.toString().padLeft(2, '0')}",
+        "state": state,
+        "title": titleValues.reverse[title],
+        "title_long": roleTypeLabelValues.reverse[titleLong],
+        "website": website,
+    };
+}
+
+class Extra {
+    final String address;
+    final String? contactForm;
+    final String? fax;
+    final String office;
+    final String? rssUrl;
+
+    Extra({
+        required this.address,
+        this.contactForm,
+        this.fax,
+        required this.office,
+        this.rssUrl,
+    });
+
+    factory Extra.fromJson(Map<String, dynamic> json) => Extra(
+        address: json["address"],
+        contactForm: json["contact_form"],
+        fax: json["fax"],
+        office: json["office"],
+        rssUrl: json["rss_url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "address": address,
+        "contact_form": contactForm,
+        "fax": fax,
+        "office": office,
+        "rss_url": rssUrl,
+    };
+}
+
+enum Party {
+    REPUBLICAN,
+    DEMOCRAT
+}
+
+final partyValues = EnumValues({
+    "Republican": Party.REPUBLICAN,
+    "Democrat": Party.DEMOCRAT
+});
+
+class Person {
+    final String bioguideid;
+    final DateTime birthday;
+    final int cspanid;
+    final String firstname;
+    final Gender gender;
+    final GenderLabel genderLabel;
+    final int id;
+    final String lastname;
+    final String link;
+    final String middlename;
+    final String name;
+    final Namemod namemod;
+    final String nickname;
+    final String osid;
+    final String? pvsid;
+    final String sortname;
+    final String? twitterid;
+    final String? youtubeid;
+
+    Person({
+        required this.bioguideid,
+        required this.birthday,
+        required this.cspanid,
+        required this.firstname,
+        required this.gender,
+        required this.genderLabel,
+        required this.id,
+        required this.lastname,
+        required this.link,
+        required this.middlename,
+        required this.name,
+        required this.namemod,
+        required this.nickname,
+        required this.osid,
+        required this.pvsid,
+        required this.sortname,
+        required this.twitterid,
+        required this.youtubeid,
+    });
+
+    factory Person.fromJson(Map<String, dynamic> json) => Person(
+        bioguideid: json["bioguideid"],
+        birthday: DateTime.parse(json["birthday"]),
+        cspanid: json["cspanid"],
+        firstname: json["firstname"],
+        gender: genderValues.map[json["gender"]]!,
+        genderLabel: genderLabelValues.map[json["gender_label"]]!,
+        id: json["id"],
+        lastname: json["lastname"],
+        link: json["link"],
+        middlename: json["middlename"],
+        name: json["name"],
+        namemod: namemodValues.map[json["namemod"]]!,
+        nickname: json["nickname"],
+        osid: json["osid"],
+        pvsid: json["pvsid"],
+        sortname: json["sortname"],
+        twitterid: json["twitterid"],
+        youtubeid: json["youtubeid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bioguideid": bioguideid,
+        "birthday": "${birthday.year.toString().padLeft(4, '0')}-${birthday.month.toString().padLeft(2, '0')}-${birthday.day.toString().padLeft(2, '0')}",
+        "cspanid": cspanid,
+        "firstname": firstname,
+        "gender": genderValues.reverse[gender],
+        "gender_label": genderLabelValues.reverse[genderLabel],
+        "id": id,
+        "lastname": lastname,
+        "link": link,
+        "middlename": middlename,
+        "name": name,
+        "namemod": namemodValues.reverse[namemod],
+        "nickname": nickname,
+        "osid": osid,
+        "pvsid": pvsid,
+        "sortname": sortname,
+        "twitterid": twitterid,
+        "youtubeid": youtubeid,
+    };
+}
+
+enum Gender {
+    MALE,
+    FEMALE
+}
+
+final genderValues = EnumValues({
+    "male": Gender.MALE,
+    "female": Gender.FEMALE
+});
+
+enum GenderLabel {
+    MALE,
+    FEMALE
+}
+
+final genderLabelValues = EnumValues({
+    "Male": GenderLabel.MALE,
+    "Female": GenderLabel.FEMALE
+});
+
+enum Namemod {
+    EMPTY,
+    JR,
+    II,
+    III,
+    IV
+}
+
+final namemodValues = EnumValues({
+    "": Namemod.EMPTY,
+    "Jr.": Namemod.JR,
+    "II": Namemod.II,
+    "III": Namemod.III,
+    "IV": Namemod.IV
+});
+
+enum RoleType {
+    REPRESENTATIVE
+}
+
+final roleTypeValues = EnumValues({
+    "representative": RoleType.REPRESENTATIVE
+});
+
+enum RoleTypeLabel {
+    REPRESENTATIVE,
+    DELEGATE,
+    RESIDENT_COMMISSIONER
+}
+
+final roleTypeLabelValues = EnumValues({
+    "Representative": RoleTypeLabel.REPRESENTATIVE,
+    "Delegate": RoleTypeLabel.DELEGATE,
+    "Resident Commissioner": RoleTypeLabel.RESIDENT_COMMISSIONER
+});
+
+enum Title {
+    REP,
+    COMMISH
+}
+
+final titleValues = EnumValues({
+    "Rep.": Title.REP,
+    "Commish.": Title.COMMISH
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/2465e.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/2465e.json/default/TopLevel.dart
new file mode 100644
index 0000000..fe1c925
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/2465e.json/default/TopLevel.dart
@@ -0,0 +1,317 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String basePath;
+    final Definitions definitions;
+    final String host;
+    final Info info;
+    final Paths paths;
+    final List<String> produces;
+    final List<String> schemes;
+    final String swagger;
+
+    TopLevel({
+        required this.basePath,
+        required this.definitions,
+        required this.host,
+        required this.info,
+        required this.paths,
+        required this.produces,
+        required this.schemes,
+        required this.swagger,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        basePath: json["basePath"],
+        definitions: Definitions.fromJson(json["definitions"]),
+        host: json["host"],
+        info: Info.fromJson(json["info"]),
+        paths: Paths.fromJson(json["paths"]),
+        produces: List<String>.from(json["produces"].map((x) => x)),
+        schemes: List<String>.from(json["schemes"].map((x) => x)),
+        swagger: json["swagger"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "basePath": basePath,
+        "definitions": definitions.toJson(),
+        "host": host,
+        "info": info.toJson(),
+        "paths": paths.toJson(),
+        "produces": List<dynamic>.from(produces.map((x) => x)),
+        "schemes": List<dynamic>.from(schemes.map((x) => x)),
+        "swagger": swagger,
+    };
+}
+
+class Definitions {
+    final Taxonomy taxonomy;
+
+    Definitions({
+        required this.taxonomy,
+    });
+
+    factory Definitions.fromJson(Map<String, dynamic> json) => Definitions(
+        taxonomy: Taxonomy.fromJson(json["Taxonomy"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Taxonomy": taxonomy.toJson(),
+    };
+}
+
+class Taxonomy {
+    final Properties properties;
+
+    Taxonomy({
+        required this.properties,
+    });
+
+    factory Taxonomy.fromJson(Map<String, dynamic> json) => Taxonomy(
+        properties: Properties.fromJson(json["properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+    };
+}
+
+class Properties {
+    final Annotations annotations;
+    final Annotations datatypeProperties;
+    final Annotations id;
+    final Annotations label;
+    final Annotations subClassOf;
+    final Annotations type;
+
+    Properties({
+        required this.annotations,
+        required this.datatypeProperties,
+        required this.id,
+        required this.label,
+        required this.subClassOf,
+        required this.type,
+    });
+
+    factory Properties.fromJson(Map<String, dynamic> json) => Properties(
+        annotations: Annotations.fromJson(json["annotations"]),
+        datatypeProperties: Annotations.fromJson(json["datatype_properties"]),
+        id: Annotations.fromJson(json["id"]),
+        label: Annotations.fromJson(json["label"]),
+        subClassOf: Annotations.fromJson(json["sub_class_of"]),
+        type: Annotations.fromJson(json["type"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "annotations": annotations.toJson(),
+        "datatype_properties": datatypeProperties.toJson(),
+        "id": id.toJson(),
+        "label": label.toJson(),
+        "sub_class_of": subClassOf.toJson(),
+        "type": type.toJson(),
+    };
+}
+
+class Annotations {
+    final String description;
+    final String type;
+
+    Annotations({
+        required this.description,
+        required this.type,
+    });
+
+    factory Annotations.fromJson(Map<String, dynamic> json) => Annotations(
+        description: json["description"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "type": type,
+    };
+}
+
+class Info {
+    final String description;
+    final String title;
+    final String version;
+
+    Info({
+        required this.description,
+        required this.title,
+        required this.version,
+    });
+
+    factory Info.fromJson(Map<String, dynamic> json) => Info(
+        description: json["description"],
+        title: json["title"],
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "title": title,
+        "version": version,
+    };
+}
+
+class Paths {
+    final ItaTaxonomiesSearch itaTaxonomiesSearch;
+
+    Paths({
+        required this.itaTaxonomiesSearch,
+    });
+
+    factory Paths.fromJson(Map<String, dynamic> json) => Paths(
+        itaTaxonomiesSearch: ItaTaxonomiesSearch.fromJson(json["/ita_taxonomies/search"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "/ita_taxonomies/search": itaTaxonomiesSearch.toJson(),
+    };
+}
+
+class ItaTaxonomiesSearch {
+    final Get itaTaxonomiesSearchGet;
+
+    ItaTaxonomiesSearch({
+        required this.itaTaxonomiesSearchGet,
+    });
+
+    factory ItaTaxonomiesSearch.fromJson(Map<String, dynamic> json) => ItaTaxonomiesSearch(
+        itaTaxonomiesSearchGet: Get.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": itaTaxonomiesSearchGet.toJson(),
+    };
+}
+
+class Get {
+    final String description;
+    final List<Parameter> parameters;
+    final Responses responses;
+    final String summary;
+    final List<String> tags;
+
+    Get({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory Get.fromJson(Map<String, dynamic> json) => Get(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: Responses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class Parameter {
+    final String description;
+    final String format;
+    final String name;
+    final String parameterIn;
+    final bool required;
+    final String type;
+
+    Parameter({
+        required this.description,
+        required this.format,
+        required this.name,
+        required this.parameterIn,
+        required this.required,
+        required this.type,
+    });
+
+    factory Parameter.fromJson(Map<String, dynamic> json) => Parameter(
+        description: json["description"],
+        format: json["format"],
+        name: json["name"],
+        parameterIn: json["in"],
+        required: json["required"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "format": format,
+        "name": name,
+        "in": parameterIn,
+        "required": required,
+        "type": type,
+    };
+}
+
+class Responses {
+    final The200 the200;
+
+    Responses({
+        required this.the200,
+    });
+
+    factory Responses.fromJson(Map<String, dynamic> json) => Responses(
+        the200: The200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class The200 {
+    final String description;
+    final Schema schema;
+
+    The200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory The200.fromJson(Map<String, dynamic> json) => The200(
+        description: json["description"],
+        schema: Schema.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class Schema {
+    final String ref;
+
+    Schema({
+        required this.ref,
+    });
+
+    factory Schema.fromJson(Map<String, dynamic> json) => Schema(
+        ref: json["\u0024ref"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "\u0024ref": ref,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/24f52.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/24f52.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/24f52.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart
new file mode 100644
index 0000000..1c1c48f
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart
@@ -0,0 +1,441 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final Text text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": textValues.reverse[text],
+    };
+}
+
+enum Text {
+    MOSTLY_CLOUDY,
+    RAIN,
+    PARTLY_CLOUDY
+}
+
+final textValues = EnumValues({
+    "Mostly Cloudy": Text.MOSTLY_CLOUDY,
+    "Rain": Text.RAIN,
+    "Partly Cloudy": Text.PARTLY_CLOUDY
+});
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final Text text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": textValues.reverse[text],
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/26b49.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/26b49.json/default/TopLevel.dart
new file mode 100644
index 0000000..95c8cd4
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/26b49.json/default/TopLevel.dart
@@ -0,0 +1,471 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final String username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": username,
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final DownsizedSmall? hd;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+    final Downsized? the480WStill;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        this.hd,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+        this.the480WStill,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        hd: json["hd"] == null ? null : DownsizedSmall.fromJson(json["hd"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+        the480WStill: json["480w_still"] == null ? null : Downsized.fromJson(json["480w_still"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "hd": hd?.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+        "480w_still": the480WStill?.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    PG,
+    G,
+    PG_13,
+    Y
+}
+
+final ratingValues = EnumValues({
+    "pg": Rating.PG,
+    "g": Rating.G,
+    "pg-13": Rating.PG_13,
+    "y": Rating.Y
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String? twitter;
+    final String username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": username,
+    };
+}
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/26c9c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/26c9c.json/default/TopLevel.dart
new file mode 100644
index 0000000..475cb76
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/26c9c.json/default/TopLevel.dart
@@ -0,0 +1,765 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final String attribution;
+    final String attributionLink;
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String description;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final String locale;
+    final Metadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final List<String> tags;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.attribution,
+        required this.attributionLink,
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.description,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.tags,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        attribution: json["attribution"],
+        attributionLink: json["attributionLink"],
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        description: json["description"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        locale: json["locale"],
+        metadata: Metadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attribution": attribution,
+        "attributionLink": attributionLink,
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "description": description,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final String dataTypeName;
+    final String fieldName;
+    final List<String>? flags;
+    final Format format;
+    final int id;
+    final String name;
+    final int position;
+    final String renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: json["dataTypeName"],
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Format.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: json["renderTypeName"],
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": dataTypeName,
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": renderTypeName,
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final String? average;
+    final int cachedContentsNull;
+    final String largest;
+    final int nonNull;
+    final String smallest;
+    final String? sum;
+    final List<Top> top;
+
+    CachedContents({
+        this.average,
+        required this.cachedContentsNull,
+        required this.largest,
+        required this.nonNull,
+        required this.smallest,
+        this.sum,
+        required this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        average: json["average"],
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        sum: json["sum"],
+        top: List<Top>.from(json["top"].map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "average": average,
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "sum": sum,
+        "top": List<dynamic>.from(top.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+class Format {
+    final String? align;
+    final String? noCommas;
+    final String? precisionStyle;
+    final String? view;
+
+    Format({
+        this.align,
+        this.noCommas,
+        this.precisionStyle,
+        this.view,
+    });
+
+    factory Format.fromJson(Map<String, dynamic> json) => Format(
+        align: json["align"],
+        noCommas: json["noCommas"],
+        precisionStyle: json["precisionStyle"],
+        view: json["view"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "align": align,
+        "noCommas": noCommas,
+        "precisionStyle": precisionStyle,
+        "view": view,
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class Metadata {
+    final List<Attachment> attachments;
+    final List<String> availableDisplayTypes;
+    final CustomFields customFields;
+    final JsonQuery jsonQuery;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+
+    Metadata({
+        required this.attachments,
+        required this.availableDisplayTypes,
+        required this.customFields,
+        required this.jsonQuery,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        attachments: List<Attachment>.from(json["attachments"].map((x) => Attachment.fromJson(x))),
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        customFields: CustomFields.fromJson(json["custom_fields"]),
+        jsonQuery: JsonQuery.fromJson(json["jsonQuery"]),
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachments": List<dynamic>.from(attachments.map((x) => x.toJson())),
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "custom_fields": customFields.toJson(),
+        "jsonQuery": jsonQuery.toJson(),
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+    };
+}
+
+class Attachment {
+    final String assetId;
+    final String blobId;
+    final String filename;
+    final String name;
+
+    Attachment({
+        required this.assetId,
+        required this.blobId,
+        required this.filename,
+        required this.name,
+    });
+
+    factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
+        assetId: json["assetId"],
+        blobId: json["blobId"],
+        filename: json["filename"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "assetId": assetId,
+        "blobId": blobId,
+        "filename": filename,
+        "name": name,
+    };
+}
+
+class CustomFields {
+    final AdditionalResources additionalResources;
+    final CommonCore commonCore;
+    final DatasetInformation datasetInformation;
+    final DatasetSummary datasetSummary;
+    final Notes notes;
+
+    CustomFields({
+        required this.additionalResources,
+        required this.commonCore,
+        required this.datasetInformation,
+        required this.datasetSummary,
+        required this.notes,
+    });
+
+    factory CustomFields.fromJson(Map<String, dynamic> json) => CustomFields(
+        additionalResources: AdditionalResources.fromJson(json["Additional Resources"]),
+        commonCore: CommonCore.fromJson(json["Common Core"]),
+        datasetInformation: DatasetInformation.fromJson(json["Dataset Information"]),
+        datasetSummary: DatasetSummary.fromJson(json["Dataset Summary"]),
+        notes: Notes.fromJson(json["Notes"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Additional Resources": additionalResources.toJson(),
+        "Common Core": commonCore.toJson(),
+        "Dataset Information": datasetInformation.toJson(),
+        "Dataset Summary": datasetSummary.toJson(),
+        "Notes": notes.toJson(),
+    };
+}
+
+class AdditionalResources {
+    final String additionalResourcesSeeAlso;
+    final String seeAlso;
+
+    AdditionalResources({
+        required this.additionalResourcesSeeAlso,
+        required this.seeAlso,
+    });
+
+    factory AdditionalResources.fromJson(Map<String, dynamic> json) => AdditionalResources(
+        additionalResourcesSeeAlso: json["See Also "],
+        seeAlso: json["See Also"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "See Also ": additionalResourcesSeeAlso,
+        "See Also": seeAlso,
+    };
+}
+
+class CommonCore {
+    final String contactEmail;
+    final String contactName;
+    final String publisher;
+
+    CommonCore({
+        required this.contactEmail,
+        required this.contactName,
+        required this.publisher,
+    });
+
+    factory CommonCore.fromJson(Map<String, dynamic> json) => CommonCore(
+        contactEmail: json["Contact Email"],
+        contactName: json["Contact Name"],
+        publisher: json["Publisher"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Email": contactEmail,
+        "Contact Name": contactName,
+        "Publisher": publisher,
+    };
+}
+
+class DatasetInformation {
+    final String agency;
+
+    DatasetInformation({
+        required this.agency,
+    });
+
+    factory DatasetInformation.fromJson(Map<String, dynamic> json) => DatasetInformation(
+        agency: json["Agency"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Agency": agency,
+    };
+}
+
+class DatasetSummary {
+    final String contactInformation;
+    final String coverage;
+    final String dataFrequency;
+    final String datasetOwner;
+    final String granularity;
+    final String organization;
+    final String postingFrequency;
+    final String timePeriod;
+    final String units;
+
+    DatasetSummary({
+        required this.contactInformation,
+        required this.coverage,
+        required this.dataFrequency,
+        required this.datasetOwner,
+        required this.granularity,
+        required this.organization,
+        required this.postingFrequency,
+        required this.timePeriod,
+        required this.units,
+    });
+
+    factory DatasetSummary.fromJson(Map<String, dynamic> json) => DatasetSummary(
+        contactInformation: json["Contact Information"],
+        coverage: json["Coverage"],
+        dataFrequency: json["Data Frequency"],
+        datasetOwner: json["Dataset Owner"],
+        granularity: json["Granularity"],
+        organization: json["Organization"],
+        postingFrequency: json["Posting Frequency"],
+        timePeriod: json["Time Period"],
+        units: json["Units"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Information": contactInformation,
+        "Coverage": coverage,
+        "Data Frequency": dataFrequency,
+        "Dataset Owner": datasetOwner,
+        "Granularity": granularity,
+        "Organization": organization,
+        "Posting Frequency": postingFrequency,
+        "Time Period": timePeriod,
+        "Units": units,
+    };
+}
+
+class Notes {
+    final String notes;
+
+    Notes({
+        required this.notes,
+    });
+
+    factory Notes.fromJson(Map<String, dynamic> json) => Notes(
+        notes: json["Notes"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Notes": notes,
+    };
+}
+
+class JsonQuery {
+    final List<Order> order;
+
+    JsonQuery({
+        required this.order,
+    });
+
+    factory JsonQuery.fromJson(Map<String, dynamic> json) => JsonQuery(
+        order: List<Order>.from(json["order"].map((x) => Order.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "order": List<dynamic>.from(order.map((x) => x.toJson())),
+    };
+}
+
+class Order {
+    final bool ascending;
+    final String columnFieldName;
+
+    Order({
+        required this.ascending,
+        required this.columnFieldName,
+    });
+
+    factory Order.fromJson(Map<String, dynamic> json) => Order(
+        ascending: json["ascending"],
+        columnFieldName: json["columnFieldName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "columnFieldName": columnFieldName,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String profileImageUrlLarge;
+    final String profileImageUrlMedium;
+    final String profileImageUrlSmall;
+    final List<String> rights;
+    final String roleName;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.profileImageUrlLarge,
+        required this.profileImageUrlMedium,
+        required this.profileImageUrlSmall,
+        required this.rights,
+        required this.roleName,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        profileImageUrlLarge: json["profileImageUrlLarge"],
+        profileImageUrlMedium: json["profileImageUrlMedium"],
+        profileImageUrlSmall: json["profileImageUrlSmall"],
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        roleName: json["roleName"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "profileImageUrlLarge": profileImageUrlLarge,
+        "profileImageUrlMedium": profileImageUrlMedium,
+        "profileImageUrlSmall": profileImageUrlSmall,
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "roleName": roleName,
+        "screenName": screenName,
+    };
+}
+
+class Query {
+    final List<OrderBy> orderBys;
+
+    Query({
+        required this.orderBys,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        orderBys: List<OrderBy>.from(json["orderBys"].map((x) => OrderBy.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "orderBys": List<dynamic>.from(orderBys.map((x) => x.toJson())),
+    };
+}
+
+class OrderBy {
+    final bool ascending;
+    final Expression expression;
+
+    OrderBy({
+        required this.ascending,
+        required this.expression,
+    });
+
+    factory OrderBy.fromJson(Map<String, dynamic> json) => OrderBy(
+        ascending: json["ascending"],
+        expression: Expression.fromJson(json["expression"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "expression": expression.toJson(),
+    };
+}
+
+class Expression {
+    final int columnId;
+    final String type;
+
+    Expression({
+        required this.columnId,
+        required this.type,
+    });
+
+    factory Expression.fromJson(Map<String, dynamic> json) => Expression(
+        columnId: json["columnId"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "columnId": columnId,
+        "type": type,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/27332.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/27332.json/default/TopLevel.dart
new file mode 100644
index 0000000..efeb140
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/27332.json/default/TopLevel.dart
@@ -0,0 +1,611 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final String? authorFlairCssClass;
+    final String? authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final String? distinguished;
+    final Domain domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final String? linkFlairCssClass;
+    final String? linkFlairText;
+    final bool locked;
+    final Media? media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final PostHint? postHint;
+    final Preview? preview;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final Media? secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final String? selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final dynamic suggestedSort;
+    final String thumbnail;
+    final int? thumbnailHeight;
+    final int? thumbnailWidth;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        this.postHint,
+        this.preview,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.thumbnailHeight,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: domainValues.map[json["domain"]]!,
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"] == null ? null : Media.fromJson(json["media"]),
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        postHint: postHintValues.map[json["post_hint"]],
+        preview: json["preview"] == null ? null : Preview.fromJson(json["preview"]),
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"] == null ? null : Media.fromJson(json["secure_media"]),
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domainValues.reverse[domain],
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media?.toJson(),
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "post_hint": postHintValues.reverse[postHint],
+        "preview": preview?.toJson(),
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia?.toJson(),
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+enum Domain {
+    SELF_PICS,
+    IMGUR_COM,
+    I_IMGUR_COM,
+    I_REDD_IT
+}
+
+final domainValues = EnumValues({
+    "self.pics": Domain.SELF_PICS,
+    "imgur.com": Domain.IMGUR_COM,
+    "i.imgur.com": Domain.I_IMGUR_COM,
+    "i.redd.it": Domain.I_REDD_IT
+});
+
+class Media {
+    final Oembed oembed;
+    final Domain type;
+
+    Media({
+        required this.oembed,
+        required this.type,
+    });
+
+    factory Media.fromJson(Map<String, dynamic> json) => Media(
+        oembed: Oembed.fromJson(json["oembed"]),
+        type: domainValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "oembed": oembed.toJson(),
+        "type": domainValues.reverse[type],
+    };
+}
+
+class Oembed {
+    final String description;
+    final int height;
+    final String html;
+    final String providerName;
+    final String providerUrl;
+    final int thumbnailHeight;
+    final String thumbnailUrl;
+    final int thumbnailWidth;
+    final String title;
+    final String type;
+    final String version;
+    final int width;
+
+    Oembed({
+        required this.description,
+        required this.height,
+        required this.html,
+        required this.providerName,
+        required this.providerUrl,
+        required this.thumbnailHeight,
+        required this.thumbnailUrl,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.type,
+        required this.version,
+        required this.width,
+    });
+
+    factory Oembed.fromJson(Map<String, dynamic> json) => Oembed(
+        description: json["description"],
+        height: json["height"],
+        html: json["html"],
+        providerName: json["provider_name"],
+        providerUrl: json["provider_url"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailUrl: json["thumbnail_url"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        type: json["type"],
+        version: json["version"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "height": height,
+        "html": html,
+        "provider_name": providerName,
+        "provider_url": providerUrl,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_url": thumbnailUrl,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "type": type,
+        "version": version,
+        "width": width,
+    };
+}
+
+class MediaEmbed {
+    final String? content;
+    final int? height;
+    final bool? scrolling;
+    final int? width;
+
+    MediaEmbed({
+        this.content,
+        this.height,
+        this.scrolling,
+        this.width,
+    });
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+        content: json["content"],
+        height: json["height"],
+        scrolling: json["scrolling"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "content": content,
+        "height": height,
+        "scrolling": scrolling,
+        "width": width,
+    };
+}
+
+enum PostHint {
+    LINK,
+    IMAGE
+}
+
+final postHintValues = EnumValues({
+    "link": PostHint.LINK,
+    "image": PostHint.IMAGE
+});
+
+class Preview {
+    final bool enabled;
+    final List<Image> images;
+
+    Preview({
+        required this.enabled,
+        required this.images,
+    });
+
+    factory Preview.fromJson(Map<String, dynamic> json) => Preview(
+        enabled: json["enabled"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "enabled": enabled,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+    };
+}
+
+class Image {
+    final String id;
+    final List<Source> resolutions;
+    final Source source;
+    final Variants variants;
+
+    Image({
+        required this.id,
+        required this.resolutions,
+        required this.source,
+        required this.variants,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        id: json["id"],
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+        variants: Variants.fromJson(json["variants"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+        "variants": variants.toJson(),
+    };
+}
+
+class Source {
+    final int height;
+    final String url;
+    final int width;
+
+    Source({
+        required this.height,
+        required this.url,
+        required this.width,
+    });
+
+    factory Source.fromJson(Map<String, dynamic> json) => Source(
+        height: json["height"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Variants {
+    Variants();
+
+    factory Variants.fromJson(Map<String, dynamic> json) => Variants(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+enum Subreddit {
+    PICS
+}
+
+final subredditValues = EnumValues({
+    "pics": Subreddit.PICS
+});
+
+enum SubredditId {
+    T5_2_QH0_U
+}
+
+final subredditIdValues = EnumValues({
+    "t5_2qh0u": SubredditId.T5_2_QH0_U
+});
+
+enum SubredditNamePrefixed {
+    R_PICS
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/pics": SubredditNamePrefixed.R_PICS
+});
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/29f47.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/29f47.json/default/TopLevel.dart
new file mode 100644
index 0000000..2a160f7
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/29f47.json/default/TopLevel.dart
@@ -0,0 +1,547 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final dynamic authorFlairCssClass;
+    final dynamic authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final Distinguished distinguished;
+    final Domain domain;
+    final int downs;
+    final dynamic edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final dynamic linkFlairCssClass;
+    final dynamic linkFlairText;
+    final bool locked;
+    final dynamic media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final PostHint? postHint;
+    final Preview? preview;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final dynamic secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final String? selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final String? suggestedSort;
+    final String thumbnail;
+    final int? thumbnailHeight;
+    final int? thumbnailWidth;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        this.postHint,
+        this.preview,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.thumbnailHeight,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: distinguishedValues.map[json["distinguished"]]!,
+        domain: domainValues.map[json["domain"]]!,
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"],
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        postHint: postHintValues.map[json["post_hint"]],
+        preview: json["preview"] == null ? null : Preview.fromJson(json["preview"]),
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"],
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguishedValues.reverse[distinguished],
+        "domain": domainValues.reverse[domain],
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media,
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "post_hint": postHintValues.reverse[postHint],
+        "preview": preview?.toJson(),
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia,
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+enum Distinguished {
+    ADMIN
+}
+
+final distinguishedValues = EnumValues({
+    "admin": Distinguished.ADMIN
+});
+
+enum Domain {
+    SELF_ANNOUNCEMENTS,
+    I_REDD_IT
+}
+
+final domainValues = EnumValues({
+    "self.announcements": Domain.SELF_ANNOUNCEMENTS,
+    "i.redd.it": Domain.I_REDD_IT
+});
+
+class MediaEmbed {
+    MediaEmbed();
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+enum PostHint {
+    SELF,
+    IMAGE
+}
+
+final postHintValues = EnumValues({
+    "self": PostHint.SELF,
+    "image": PostHint.IMAGE
+});
+
+class Preview {
+    final bool enabled;
+    final List<Image> images;
+
+    Preview({
+        required this.enabled,
+        required this.images,
+    });
+
+    factory Preview.fromJson(Map<String, dynamic> json) => Preview(
+        enabled: json["enabled"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "enabled": enabled,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+    };
+}
+
+class Image {
+    final String id;
+    final List<Source> resolutions;
+    final Source source;
+    final Variants variants;
+
+    Image({
+        required this.id,
+        required this.resolutions,
+        required this.source,
+        required this.variants,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        id: json["id"],
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+        variants: Variants.fromJson(json["variants"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+        "variants": variants.toJson(),
+    };
+}
+
+class Source {
+    final int height;
+    final String url;
+    final int width;
+
+    Source({
+        required this.height,
+        required this.url,
+        required this.width,
+    });
+
+    factory Source.fromJson(Map<String, dynamic> json) => Source(
+        height: json["height"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Variants {
+    final Gif? gif;
+    final Gif? mp4;
+
+    Variants({
+        this.gif,
+        this.mp4,
+    });
+
+    factory Variants.fromJson(Map<String, dynamic> json) => Variants(
+        gif: json["gif"] == null ? null : Gif.fromJson(json["gif"]),
+        mp4: json["mp4"] == null ? null : Gif.fromJson(json["mp4"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "gif": gif?.toJson(),
+        "mp4": mp4?.toJson(),
+    };
+}
+
+class Gif {
+    final List<Source> resolutions;
+    final Source source;
+
+    Gif({
+        required this.resolutions,
+        required this.source,
+    });
+
+    factory Gif.fromJson(Map<String, dynamic> json) => Gif(
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+    };
+}
+
+enum Subreddit {
+    ANNOUNCEMENTS
+}
+
+final subredditValues = EnumValues({
+    "announcements": Subreddit.ANNOUNCEMENTS
+});
+
+enum SubredditId {
+    T5_2_R0_IJ
+}
+
+final subredditIdValues = EnumValues({
+    "t5_2r0ij": SubredditId.T5_2_R0_IJ
+});
+
+enum SubredditNamePrefixed {
+    R_ANNOUNCEMENTS
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/announcements": SubredditNamePrefixed.R_ANNOUNCEMENTS
+});
+
+enum SubredditType {
+    RESTRICTED
+}
+
+final subredditTypeValues = EnumValues({
+    "restricted": SubredditType.RESTRICTED
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart
new file mode 100644
index 0000000..7a2f6bd
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart
@@ -0,0 +1,397 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Meta meta;
+    final List<Object> objects;
+
+    TopLevel({
+        required this.meta,
+        required this.objects,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        meta: Meta.fromJson(json["meta"]),
+        objects: List<Object>.from(json["objects"].map((x) => Object.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "objects": List<dynamic>.from(objects.map((x) => x.toJson())),
+    };
+}
+
+class Meta {
+    final int limit;
+    final int offset;
+    final int totalCount;
+
+    Meta({
+        required this.limit,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        limit: json["limit"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "limit": limit,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class Object {
+    final Party? caucus;
+    final List<int> congressNumbers;
+    final bool current;
+    final String description;
+    final dynamic district;
+    final DateTime enddate;
+    final Extra extra;
+    final int id;
+    final String? leadershipTitle;
+    final Party party;
+    final Person person;
+    final String phone;
+    final RoleType roleType;
+    final RoleTypeLabel roleTypeLabel;
+    final SenatorClass senatorClass;
+    final SenatorClassLabel senatorClassLabel;
+    final SenatorRank senatorRank;
+    final SenatorRankLabel senatorRankLabel;
+    final DateTime startdate;
+    final String state;
+    final Title title;
+    final RoleTypeLabel titleLong;
+    final String website;
+
+    Object({
+        required this.caucus,
+        required this.congressNumbers,
+        required this.current,
+        required this.description,
+        required this.district,
+        required this.enddate,
+        required this.extra,
+        required this.id,
+        required this.leadershipTitle,
+        required this.party,
+        required this.person,
+        required this.phone,
+        required this.roleType,
+        required this.roleTypeLabel,
+        required this.senatorClass,
+        required this.senatorClassLabel,
+        required this.senatorRank,
+        required this.senatorRankLabel,
+        required this.startdate,
+        required this.state,
+        required this.title,
+        required this.titleLong,
+        required this.website,
+    });
+
+    factory Object.fromJson(Map<String, dynamic> json) => Object(
+        caucus: partyValues.map[json["caucus"]],
+        congressNumbers: List<int>.from(json["congress_numbers"].map((x) => x)),
+        current: json["current"],
+        description: json["description"],
+        district: json["district"],
+        enddate: DateTime.parse(json["enddate"]),
+        extra: Extra.fromJson(json["extra"]),
+        id: json["id"],
+        leadershipTitle: json["leadership_title"],
+        party: partyValues.map[json["party"]]!,
+        person: Person.fromJson(json["person"]),
+        phone: json["phone"],
+        roleType: roleTypeValues.map[json["role_type"]]!,
+        roleTypeLabel: roleTypeLabelValues.map[json["role_type_label"]]!,
+        senatorClass: senatorClassValues.map[json["senator_class"]]!,
+        senatorClassLabel: senatorClassLabelValues.map[json["senator_class_label"]]!,
+        senatorRank: senatorRankValues.map[json["senator_rank"]]!,
+        senatorRankLabel: senatorRankLabelValues.map[json["senator_rank_label"]]!,
+        startdate: DateTime.parse(json["startdate"]),
+        state: json["state"],
+        title: titleValues.map[json["title"]]!,
+        titleLong: roleTypeLabelValues.map[json["title_long"]]!,
+        website: json["website"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "caucus": partyValues.reverse[caucus],
+        "congress_numbers": List<dynamic>.from(congressNumbers.map((x) => x)),
+        "current": current,
+        "description": description,
+        "district": district,
+        "enddate": "${enddate.year.toString().padLeft(4, '0')}-${enddate.month.toString().padLeft(2, '0')}-${enddate.day.toString().padLeft(2, '0')}",
+        "extra": extra.toJson(),
+        "id": id,
+        "leadership_title": leadershipTitle,
+        "party": partyValues.reverse[party],
+        "person": person.toJson(),
+        "phone": phone,
+        "role_type": roleTypeValues.reverse[roleType],
+        "role_type_label": roleTypeLabelValues.reverse[roleTypeLabel],
+        "senator_class": senatorClassValues.reverse[senatorClass],
+        "senator_class_label": senatorClassLabelValues.reverse[senatorClassLabel],
+        "senator_rank": senatorRankValues.reverse[senatorRank],
+        "senator_rank_label": senatorRankLabelValues.reverse[senatorRankLabel],
+        "startdate": "${startdate.year.toString().padLeft(4, '0')}-${startdate.month.toString().padLeft(2, '0')}-${startdate.day.toString().padLeft(2, '0')}",
+        "state": state,
+        "title": titleValues.reverse[title],
+        "title_long": roleTypeLabelValues.reverse[titleLong],
+        "website": website,
+    };
+}
+
+enum Party {
+    REPUBLICAN,
+    DEMOCRAT,
+    INDEPENDENT
+}
+
+final partyValues = EnumValues({
+    "Republican": Party.REPUBLICAN,
+    "Democrat": Party.DEMOCRAT,
+    "Independent": Party.INDEPENDENT
+});
+
+class Extra {
+    final String address;
+    final String contactForm;
+    final String? fax;
+    final String office;
+    final String? rssUrl;
+
+    Extra({
+        required this.address,
+        required this.contactForm,
+        this.fax,
+        required this.office,
+        this.rssUrl,
+    });
+
+    factory Extra.fromJson(Map<String, dynamic> json) => Extra(
+        address: json["address"],
+        contactForm: json["contact_form"],
+        fax: json["fax"],
+        office: json["office"],
+        rssUrl: json["rss_url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "address": address,
+        "contact_form": contactForm,
+        "fax": fax,
+        "office": office,
+        "rss_url": rssUrl,
+    };
+}
+
+class Person {
+    final String bioguideid;
+    final DateTime birthday;
+    final int cspanid;
+    final String firstname;
+    final Gender gender;
+    final GenderLabel genderLabel;
+    final int id;
+    final String lastname;
+    final String link;
+    final String middlename;
+    final String name;
+    final Namemod namemod;
+    final String nickname;
+    final String osid;
+    final String pvsid;
+    final String sortname;
+    final String? twitterid;
+    final String? youtubeid;
+
+    Person({
+        required this.bioguideid,
+        required this.birthday,
+        required this.cspanid,
+        required this.firstname,
+        required this.gender,
+        required this.genderLabel,
+        required this.id,
+        required this.lastname,
+        required this.link,
+        required this.middlename,
+        required this.name,
+        required this.namemod,
+        required this.nickname,
+        required this.osid,
+        required this.pvsid,
+        required this.sortname,
+        required this.twitterid,
+        required this.youtubeid,
+    });
+
+    factory Person.fromJson(Map<String, dynamic> json) => Person(
+        bioguideid: json["bioguideid"],
+        birthday: DateTime.parse(json["birthday"]),
+        cspanid: json["cspanid"],
+        firstname: json["firstname"],
+        gender: genderValues.map[json["gender"]]!,
+        genderLabel: genderLabelValues.map[json["gender_label"]]!,
+        id: json["id"],
+        lastname: json["lastname"],
+        link: json["link"],
+        middlename: json["middlename"],
+        name: json["name"],
+        namemod: namemodValues.map[json["namemod"]]!,
+        nickname: json["nickname"],
+        osid: json["osid"],
+        pvsid: json["pvsid"],
+        sortname: json["sortname"],
+        twitterid: json["twitterid"],
+        youtubeid: json["youtubeid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bioguideid": bioguideid,
+        "birthday": "${birthday.year.toString().padLeft(4, '0')}-${birthday.month.toString().padLeft(2, '0')}-${birthday.day.toString().padLeft(2, '0')}",
+        "cspanid": cspanid,
+        "firstname": firstname,
+        "gender": genderValues.reverse[gender],
+        "gender_label": genderLabelValues.reverse[genderLabel],
+        "id": id,
+        "lastname": lastname,
+        "link": link,
+        "middlename": middlename,
+        "name": name,
+        "namemod": namemodValues.reverse[namemod],
+        "nickname": nickname,
+        "osid": osid,
+        "pvsid": pvsid,
+        "sortname": sortname,
+        "twitterid": twitterid,
+        "youtubeid": youtubeid,
+    };
+}
+
+enum Gender {
+    MALE,
+    FEMALE
+}
+
+final genderValues = EnumValues({
+    "male": Gender.MALE,
+    "female": Gender.FEMALE
+});
+
+enum GenderLabel {
+    MALE,
+    FEMALE
+}
+
+final genderLabelValues = EnumValues({
+    "Male": GenderLabel.MALE,
+    "Female": GenderLabel.FEMALE
+});
+
+enum Namemod {
+    EMPTY,
+    III,
+    JR
+}
+
+final namemodValues = EnumValues({
+    "": Namemod.EMPTY,
+    "III": Namemod.III,
+    "Jr.": Namemod.JR
+});
+
+enum RoleType {
+    SENATOR
+}
+
+final roleTypeValues = EnumValues({
+    "senator": RoleType.SENATOR
+});
+
+enum RoleTypeLabel {
+    SENATOR
+}
+
+final roleTypeLabelValues = EnumValues({
+    "Senator": RoleTypeLabel.SENATOR
+});
+
+enum SenatorClass {
+    CLASS2,
+    CLASS1,
+    CLASS3
+}
+
+final senatorClassValues = EnumValues({
+    "class2": SenatorClass.CLASS2,
+    "class1": SenatorClass.CLASS1,
+    "class3": SenatorClass.CLASS3
+});
+
+enum SenatorClassLabel {
+    CLASS_2,
+    CLASS_1,
+    CLASS_3
+}
+
+final senatorClassLabelValues = EnumValues({
+    "Class 2": SenatorClassLabel.CLASS_2,
+    "Class 1": SenatorClassLabel.CLASS_1,
+    "Class 3": SenatorClassLabel.CLASS_3
+});
+
+enum SenatorRank {
+    SENIOR,
+    JUNIOR
+}
+
+final senatorRankValues = EnumValues({
+    "senior": SenatorRank.SENIOR,
+    "junior": SenatorRank.JUNIOR
+});
+
+enum SenatorRankLabel {
+    SENIOR,
+    JUNIOR
+}
+
+final senatorRankLabelValues = EnumValues({
+    "Senior": SenatorRankLabel.SENIOR,
+    "Junior": SenatorRankLabel.JUNIOR
+});
+
+enum Title {
+    SEN
+}
+
+final titleValues = EnumValues({
+    "Sen.": Title.SEN
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/2df80.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/2df80.json/default/TopLevel.dart
new file mode 100644
index 0000000..6352f47
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/2df80.json/default/TopLevel.dart
@@ -0,0 +1,221 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<dynamic> topLevelFromJson(String str) => List<dynamic>.from(json.decode(str).map((x) => x));
+
+String topLevelToJson(List<dynamic> data) => json.encode(List<dynamic>.from(data.map((x) => x)));
+
+class TopLevelElement {
+    final Adminregion adminregion;
+    final String capitalCity;
+    final String id;
+    final Adminregion incomeLevel;
+    final String iso2Code;
+    final String latitude;
+    final Adminregion lendingType;
+    final String longitude;
+    final String name;
+    final Adminregion region;
+
+    TopLevelElement({
+        required this.adminregion,
+        required this.capitalCity,
+        required this.id,
+        required this.incomeLevel,
+        required this.iso2Code,
+        required this.latitude,
+        required this.lendingType,
+        required this.longitude,
+        required this.name,
+        required this.region,
+    });
+
+    factory TopLevelElement.fromJson(Map<String, dynamic> json) => TopLevelElement(
+        adminregion: Adminregion.fromJson(json["adminregion"]),
+        capitalCity: json["capitalCity"],
+        id: json["id"],
+        incomeLevel: Adminregion.fromJson(json["incomeLevel"]),
+        iso2Code: json["iso2Code"],
+        latitude: json["latitude"],
+        lendingType: Adminregion.fromJson(json["lendingType"]),
+        longitude: json["longitude"],
+        name: json["name"],
+        region: Adminregion.fromJson(json["region"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "adminregion": adminregion.toJson(),
+        "capitalCity": capitalCity,
+        "id": id,
+        "incomeLevel": incomeLevel.toJson(),
+        "iso2Code": iso2Code,
+        "latitude": latitude,
+        "lendingType": lendingType.toJson(),
+        "longitude": longitude,
+        "name": name,
+        "region": region.toJson(),
+    };
+}
+
+class Adminregion {
+    final Id id;
+    final Value value;
+
+    Adminregion({
+        required this.id,
+        required this.value,
+    });
+
+    factory Adminregion.fromJson(Map<String, dynamic> json) => Adminregion(
+        id: idValues.map[json["id"]]!,
+        value: valueValues.map[json["value"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": idValues.reverse[id],
+        "value": valueValues.reverse[value],
+    };
+}
+
+enum Id {
+    EMPTY,
+    SAS,
+    SSA,
+    ECA,
+    LAC,
+    EAP,
+    MNA,
+    HIC,
+    LIC,
+    NA,
+    LMC,
+    UMC,
+    LNX,
+    IDX,
+    IBD,
+    IDB,
+    LCN,
+    SSF,
+    ECS,
+    MEA,
+    EAS,
+    NAC
+}
+
+final idValues = EnumValues({
+    "": Id.EMPTY,
+    "SAS": Id.SAS,
+    "SSA": Id.SSA,
+    "ECA": Id.ECA,
+    "LAC": Id.LAC,
+    "EAP": Id.EAP,
+    "MNA": Id.MNA,
+    "HIC": Id.HIC,
+    "LIC": Id.LIC,
+    "NA": Id.NA,
+    "LMC": Id.LMC,
+    "UMC": Id.UMC,
+    "LNX": Id.LNX,
+    "IDX": Id.IDX,
+    "IBD": Id.IBD,
+    "IDB": Id.IDB,
+    "LCN": Id.LCN,
+    "SSF": Id.SSF,
+    "ECS": Id.ECS,
+    "MEA": Id.MEA,
+    "EAS": Id.EAS,
+    "NAC": Id.NAC
+});
+
+enum Value {
+    EMPTY,
+    SOUTH_ASIA,
+    SUB_SAHARAN_AFRICA_EXCLUDING_HIGH_INCOME,
+    EUROPE_CENTRAL_ASIA_EXCLUDING_HIGH_INCOME,
+    LATIN_AMERICA_CARIBBEAN_EXCLUDING_HIGH_INCOME,
+    EAST_ASIA_PACIFIC_EXCLUDING_HIGH_INCOME,
+    MIDDLE_EAST_NORTH_AFRICA_EXCLUDING_HIGH_INCOME,
+    HIGH_INCOME,
+    LOW_INCOME,
+    AGGREGATES,
+    LOWER_MIDDLE_INCOME,
+    UPPER_MIDDLE_INCOME,
+    NOT_CLASSIFIED,
+    IDA,
+    IBRD,
+    BLEND,
+    LATIN_AMERICA_CARIBBEAN,
+    SUB_SAHARAN_AFRICA,
+    EUROPE_CENTRAL_ASIA,
+    MIDDLE_EAST_NORTH_AFRICA,
+    EAST_ASIA_PACIFIC,
+    NORTH_AMERICA
+}
+
+final valueValues = EnumValues({
+    "": Value.EMPTY,
+    "South Asia": Value.SOUTH_ASIA,
+    "Sub-Saharan Africa (excluding high income)": Value.SUB_SAHARAN_AFRICA_EXCLUDING_HIGH_INCOME,
+    "Europe & Central Asia (excluding high income)": Value.EUROPE_CENTRAL_ASIA_EXCLUDING_HIGH_INCOME,
+    "Latin America & Caribbean (excluding high income)": Value.LATIN_AMERICA_CARIBBEAN_EXCLUDING_HIGH_INCOME,
+    "East Asia & Pacific (excluding high income)": Value.EAST_ASIA_PACIFIC_EXCLUDING_HIGH_INCOME,
+    "Middle East & North Africa (excluding high income)": Value.MIDDLE_EAST_NORTH_AFRICA_EXCLUDING_HIGH_INCOME,
+    "High income": Value.HIGH_INCOME,
+    "Low income": Value.LOW_INCOME,
+    "Aggregates": Value.AGGREGATES,
+    "Lower middle income": Value.LOWER_MIDDLE_INCOME,
+    "Upper middle income": Value.UPPER_MIDDLE_INCOME,
+    "Not classified": Value.NOT_CLASSIFIED,
+    "IDA": Value.IDA,
+    "IBRD": Value.IBRD,
+    "Blend": Value.BLEND,
+    "Latin America & Caribbean ": Value.LATIN_AMERICA_CARIBBEAN,
+    "Sub-Saharan Africa ": Value.SUB_SAHARAN_AFRICA,
+    "Europe & Central Asia": Value.EUROPE_CENTRAL_ASIA,
+    "Middle East & North Africa": Value.MIDDLE_EAST_NORTH_AFRICA,
+    "East Asia & Pacific": Value.EAST_ASIA_PACIFIC,
+    "North America": Value.NORTH_AMERICA
+});
+
+class PurpleTopLevel {
+    final int page;
+    final int pages;
+    final String perPage;
+    final int total;
+
+    PurpleTopLevel({
+        required this.page,
+        required this.pages,
+        required this.perPage,
+        required this.total,
+    });
+
+    factory PurpleTopLevel.fromJson(Map<String, dynamic> json) => PurpleTopLevel(
+        page: json["page"],
+        pages: json["pages"],
+        perPage: json["per_page"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "page": page,
+        "pages": pages,
+        "per_page": perPage,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/31189.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/31189.json/default/TopLevel.dart
new file mode 100644
index 0000000..a1e6db4
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/31189.json/default/TopLevel.dart
@@ -0,0 +1,117 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String details;
+    final List<Rate> rates;
+    final dynamic version;
+
+    TopLevel({
+        required this.details,
+        required this.rates,
+        required this.version,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        details: json["details"],
+        rates: List<Rate>.from(json["rates"].map((x) => Rate.fromJson(x))),
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "details": details,
+        "rates": List<dynamic>.from(rates.map((x) => x.toJson())),
+        "version": version,
+    };
+}
+
+class Rate {
+    final String code;
+    final String countryCode;
+    final String name;
+    final List<Period> periods;
+
+    Rate({
+        required this.code,
+        required this.countryCode,
+        required this.name,
+        required this.periods,
+    });
+
+    factory Rate.fromJson(Map<String, dynamic> json) => Rate(
+        code: json["code"],
+        countryCode: json["country_code"],
+        name: json["name"],
+        periods: List<Period>.from(json["periods"].map((x) => Period.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "country_code": countryCode,
+        "name": name,
+        "periods": List<dynamic>.from(periods.map((x) => x.toJson())),
+    };
+}
+
+class Period {
+    final DateTime effectiveFrom;
+    final Rates rates;
+
+    Period({
+        required this.effectiveFrom,
+        required this.rates,
+    });
+
+    factory Period.fromJson(Map<String, dynamic> json) => Period(
+        effectiveFrom: DateTime.parse(json["effective_from"]),
+        rates: Rates.fromJson(json["rates"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "effective_from": "${effectiveFrom.year.toString().padLeft(4, '0')}-${effectiveFrom.month.toString().padLeft(2, '0')}-${effectiveFrom.day.toString().padLeft(2, '0')}",
+        "rates": rates.toJson(),
+    };
+}
+
+class Rates {
+    final double? parking;
+    final double? reduced;
+    final double? reduced1;
+    final double? reduced2;
+    final double standard;
+    final double? superReduced;
+
+    Rates({
+        this.parking,
+        this.reduced,
+        this.reduced1,
+        this.reduced2,
+        required this.standard,
+        this.superReduced,
+    });
+
+    factory Rates.fromJson(Map<String, dynamic> json) => Rates(
+        parking: json["parking"]?.toDouble(),
+        reduced: json["reduced"]?.toDouble(),
+        reduced1: json["reduced1"]?.toDouble(),
+        reduced2: json["reduced2"]?.toDouble(),
+        standard: json["standard"]?.toDouble(),
+        superReduced: json["super_reduced"]?.toDouble(),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "parking": parking,
+        "reduced": reduced,
+        "reduced1": reduced1,
+        "reduced2": reduced2,
+        "standard": standard,
+        "super_reduced": superReduced,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/32431.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/32431.json/default/TopLevel.dart
new file mode 100644
index 0000000..9d3d6ee
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/32431.json/default/TopLevel.dart
@@ -0,0 +1,295 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<double> bbox;
+    final List<Feature> features;
+    final Metadata metadata;
+    final String type;
+
+    TopLevel({
+        required this.bbox,
+        required this.features,
+        required this.metadata,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        bbox: List<double>.from(json["bbox"].map((x) => x?.toDouble())),
+        features: List<Feature>.from(json["features"].map((x) => Feature.fromJson(x))),
+        metadata: Metadata.fromJson(json["metadata"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bbox": List<dynamic>.from(bbox.map((x) => x)),
+        "features": List<dynamic>.from(features.map((x) => x.toJson())),
+        "metadata": metadata.toJson(),
+        "type": type,
+    };
+}
+
+class Feature {
+    final Geometry geometry;
+    final String id;
+    final Properties properties;
+    final FeatureType type;
+
+    Feature({
+        required this.geometry,
+        required this.id,
+        required this.properties,
+        required this.type,
+    });
+
+    factory Feature.fromJson(Map<String, dynamic> json) => Feature(
+        geometry: Geometry.fromJson(json["geometry"]),
+        id: json["id"],
+        properties: Properties.fromJson(json["properties"]),
+        type: featureTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "geometry": geometry.toJson(),
+        "id": id,
+        "properties": properties.toJson(),
+        "type": featureTypeValues.reverse[type],
+    };
+}
+
+class Geometry {
+    final List<double> coordinates;
+    final GeometryType type;
+
+    Geometry({
+        required this.coordinates,
+        required this.type,
+    });
+
+    factory Geometry.fromJson(Map<String, dynamic> json) => Geometry(
+        coordinates: List<double>.from(json["coordinates"].map((x) => x?.toDouble())),
+        type: geometryTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "coordinates": List<dynamic>.from(coordinates.map((x) => x)),
+        "type": geometryTypeValues.reverse[type],
+    };
+}
+
+enum GeometryType {
+    POINT
+}
+
+final geometryTypeValues = EnumValues({
+    "Point": GeometryType.POINT
+});
+
+class Properties {
+    final dynamic alert;
+    final dynamic cdi;
+    final String code;
+    final String detail;
+    final double? dmin;
+    final dynamic felt;
+    final int? gap;
+    final String ids;
+    final double mag;
+    final MagType magType;
+    final dynamic mmi;
+    final String net;
+    final int? nst;
+    final String place;
+    final double rms;
+    final int sig;
+    final String sources;
+    final Status status;
+    final int time;
+    final String title;
+    final int tsunami;
+    final PropertiesType type;
+    final String types;
+    final int tz;
+    final int updated;
+    final String url;
+
+    Properties({
+        required this.alert,
+        required this.cdi,
+        required this.code,
+        required this.detail,
+        required this.dmin,
+        required this.felt,
+        required this.gap,
+        required this.ids,
+        required this.mag,
+        required this.magType,
+        required this.mmi,
+        required this.net,
+        required this.nst,
+        required this.place,
+        required this.rms,
+        required this.sig,
+        required this.sources,
+        required this.status,
+        required this.time,
+        required this.title,
+        required this.tsunami,
+        required this.type,
+        required this.types,
+        required this.tz,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Properties.fromJson(Map<String, dynamic> json) => Properties(
+        alert: json["alert"],
+        cdi: json["cdi"],
+        code: json["code"],
+        detail: json["detail"],
+        dmin: json["dmin"]?.toDouble(),
+        felt: json["felt"],
+        gap: json["gap"],
+        ids: json["ids"],
+        mag: json["mag"]?.toDouble(),
+        magType: magTypeValues.map[json["magType"]]!,
+        mmi: json["mmi"],
+        net: json["net"],
+        nst: json["nst"],
+        place: json["place"],
+        rms: json["rms"]?.toDouble(),
+        sig: json["sig"],
+        sources: json["sources"],
+        status: statusValues.map[json["status"]]!,
+        time: json["time"],
+        title: json["title"],
+        tsunami: json["tsunami"],
+        type: propertiesTypeValues.map[json["type"]]!,
+        types: json["types"],
+        tz: json["tz"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "alert": alert,
+        "cdi": cdi,
+        "code": code,
+        "detail": detail,
+        "dmin": dmin,
+        "felt": felt,
+        "gap": gap,
+        "ids": ids,
+        "mag": mag,
+        "magType": magTypeValues.reverse[magType],
+        "mmi": mmi,
+        "net": net,
+        "nst": nst,
+        "place": place,
+        "rms": rms,
+        "sig": sig,
+        "sources": sources,
+        "status": statusValues.reverse[status],
+        "time": time,
+        "title": title,
+        "tsunami": tsunami,
+        "type": propertiesTypeValues.reverse[type],
+        "types": types,
+        "tz": tz,
+        "updated": updated,
+        "url": url,
+    };
+}
+
+enum MagType {
+    MD,
+    ML,
+    MB
+}
+
+final magTypeValues = EnumValues({
+    "md": MagType.MD,
+    "ml": MagType.ML,
+    "mb": MagType.MB
+});
+
+enum Status {
+    AUTOMATIC,
+    REVIEWED
+}
+
+final statusValues = EnumValues({
+    "automatic": Status.AUTOMATIC,
+    "reviewed": Status.REVIEWED
+});
+
+enum PropertiesType {
+    EARTHQUAKE
+}
+
+final propertiesTypeValues = EnumValues({
+    "earthquake": PropertiesType.EARTHQUAKE
+});
+
+enum FeatureType {
+    FEATURE
+}
+
+final featureTypeValues = EnumValues({
+    "Feature": FeatureType.FEATURE
+});
+
+class Metadata {
+    final String api;
+    final int count;
+    final int generated;
+    final int status;
+    final String title;
+    final String url;
+
+    Metadata({
+        required this.api,
+        required this.count,
+        required this.generated,
+        required this.status,
+        required this.title,
+        required this.url,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        api: json["api"],
+        count: json["count"],
+        generated: json["generated"],
+        status: json["status"],
+        title: json["title"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "api": api,
+        "count": count,
+        "generated": generated,
+        "status": status,
+        "title": title,
+        "url": url,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart
new file mode 100644
index 0000000..102babc
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart
@@ -0,0 +1,53 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final DateTime? birthDate;
+    final bool birthDateIsProtected;
+    final int genderTypeId;
+    final String notes;
+    final String parliamentaryName;
+    final int personId;
+    final String photoUrl;
+    final String preferredName;
+
+    TopLevel({
+        required this.birthDate,
+        required this.birthDateIsProtected,
+        required this.genderTypeId,
+        required this.notes,
+        required this.parliamentaryName,
+        required this.personId,
+        required this.photoUrl,
+        required this.preferredName,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        birthDate: json["BirthDate"] == null ? null : DateTime.parse(json["BirthDate"]),
+        birthDateIsProtected: json["BirthDateIsProtected"],
+        genderTypeId: json["GenderTypeID"],
+        notes: json["Notes"],
+        parliamentaryName: json["ParliamentaryName"],
+        personId: json["PersonID"],
+        photoUrl: json["PhotoURL"],
+        preferredName: json["PreferredName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "BirthDate": birthDate?.toIso8601String(),
+        "BirthDateIsProtected": birthDateIsProtected,
+        "GenderTypeID": genderTypeId,
+        "Notes": notes,
+        "ParliamentaryName": parliamentaryName,
+        "PersonID": personId,
+        "PhotoURL": photoUrl,
+        "PreferredName": preferredName,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart
new file mode 100644
index 0000000..7bee3e9
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart
@@ -0,0 +1,287 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final String next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final int? costAbsolute;
+    final int? costMax;
+    final int? costMin;
+    final DateTime createdAt;
+    final List<CustomIncome> customIncomes;
+    final dynamic directRepCostsMax;
+    final dynamic directRepCostsMin;
+    final DateTime endDate;
+    final int eurSourcesGrants;
+    final String? eurSourcesGrantsSrc;
+    final int eurSourcesProcurement;
+    final String? eurSourcesProcurementSrc;
+    final String id;
+    final dynamic newOrganisation;
+    final String? noClients;
+    final String? otherFinancialInformation;
+    final int? otherSourcesContributions;
+    final int? otherSourcesDonation;
+    final int? otherSourcesTotal;
+    final int? publicFinancingInfranational;
+    final int? publicFinancingNational;
+    final int? publicFinancingTotal;
+    final String representative;
+    final DateTime startDate;
+    final Status status;
+    final int? totalBudget;
+    final int? turnoverAbsolute;
+    final int? turnoverMax;
+    final int? turnoverMin;
+    final ResultType type;
+    final DateTime updatedAt;
+    final String uri;
+
+    Result({
+        required this.costAbsolute,
+        required this.costMax,
+        required this.costMin,
+        required this.createdAt,
+        required this.customIncomes,
+        required this.directRepCostsMax,
+        required this.directRepCostsMin,
+        required this.endDate,
+        required this.eurSourcesGrants,
+        required this.eurSourcesGrantsSrc,
+        required this.eurSourcesProcurement,
+        required this.eurSourcesProcurementSrc,
+        required this.id,
+        required this.newOrganisation,
+        required this.noClients,
+        required this.otherFinancialInformation,
+        required this.otherSourcesContributions,
+        required this.otherSourcesDonation,
+        required this.otherSourcesTotal,
+        required this.publicFinancingInfranational,
+        required this.publicFinancingNational,
+        required this.publicFinancingTotal,
+        required this.representative,
+        required this.startDate,
+        required this.status,
+        required this.totalBudget,
+        required this.turnoverAbsolute,
+        required this.turnoverMax,
+        required this.turnoverMin,
+        required this.type,
+        required this.updatedAt,
+        required this.uri,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        costAbsolute: json["cost_absolute"],
+        costMax: json["cost_max"],
+        costMin: json["cost_min"],
+        createdAt: DateTime.parse(json["created_at"]),
+        customIncomes: List<CustomIncome>.from(json["customIncomes"].map((x) => CustomIncome.fromJson(x))),
+        directRepCostsMax: json["direct_rep_costs_max"],
+        directRepCostsMin: json["direct_rep_costs_min"],
+        endDate: DateTime.parse(json["end_date"]),
+        eurSourcesGrants: json["eur_sources_grants"],
+        eurSourcesGrantsSrc: json["eur_sources_grants_src"],
+        eurSourcesProcurement: json["eur_sources_procurement"],
+        eurSourcesProcurementSrc: json["eur_sources_procurement_src"],
+        id: json["id"],
+        newOrganisation: json["new_organisation"],
+        noClients: json["no_clients"],
+        otherFinancialInformation: json["other_financial_information"],
+        otherSourcesContributions: json["other_sources_contributions"],
+        otherSourcesDonation: json["other_sources_donation"],
+        otherSourcesTotal: json["other_sources_total"],
+        publicFinancingInfranational: json["public_financing_infranational"],
+        publicFinancingNational: json["public_financing_national"],
+        publicFinancingTotal: json["public_financing_total"],
+        representative: json["representative"],
+        startDate: DateTime.parse(json["start_date"]),
+        status: statusValues.map[json["status"]]!,
+        totalBudget: json["total_budget"],
+        turnoverAbsolute: json["turnover_absolute"],
+        turnoverMax: json["turnover_max"],
+        turnoverMin: json["turnover_min"],
+        type: resultTypeValues.map[json["type"]]!,
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cost_absolute": costAbsolute,
+        "cost_max": costMax,
+        "cost_min": costMin,
+        "created_at": createdAt.toIso8601String(),
+        "customIncomes": List<dynamic>.from(customIncomes.map((x) => x.toJson())),
+        "direct_rep_costs_max": directRepCostsMax,
+        "direct_rep_costs_min": directRepCostsMin,
+        "end_date": endDate.toIso8601String(),
+        "eur_sources_grants": eurSourcesGrants,
+        "eur_sources_grants_src": eurSourcesGrantsSrc,
+        "eur_sources_procurement": eurSourcesProcurement,
+        "eur_sources_procurement_src": eurSourcesProcurementSrc,
+        "id": id,
+        "new_organisation": newOrganisation,
+        "no_clients": noClients,
+        "other_financial_information": otherFinancialInformation,
+        "other_sources_contributions": otherSourcesContributions,
+        "other_sources_donation": otherSourcesDonation,
+        "other_sources_total": otherSourcesTotal,
+        "public_financing_infranational": publicFinancingInfranational,
+        "public_financing_national": publicFinancingNational,
+        "public_financing_total": publicFinancingTotal,
+        "representative": representative,
+        "start_date": startDate.toIso8601String(),
+        "status": statusValues.reverse[status],
+        "total_budget": totalBudget,
+        "turnover_absolute": turnoverAbsolute,
+        "turnover_max": turnoverMax,
+        "turnover_min": turnoverMin,
+        "type": resultTypeValues.reverse[type],
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+    };
+}
+
+class CustomIncome {
+    final int amount;
+    final DateTime createdAt;
+    final String id;
+    final String name;
+    final Status status;
+    final CustomIncomeType type;
+    final DateTime updatedAt;
+    final String uri;
+
+    CustomIncome({
+        required this.amount,
+        required this.createdAt,
+        required this.id,
+        required this.name,
+        required this.status,
+        required this.type,
+        required this.updatedAt,
+        required this.uri,
+    });
+
+    factory CustomIncome.fromJson(Map<String, dynamic> json) => CustomIncome(
+        amount: json["amount"],
+        createdAt: DateTime.parse(json["created_at"]),
+        id: json["id"],
+        name: json["name"],
+        status: statusValues.map[json["status"]]!,
+        type: customIncomeTypeValues.map[json["type"]]!,
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "amount": amount,
+        "created_at": createdAt.toIso8601String(),
+        "id": id,
+        "name": name,
+        "status": statusValues.reverse[status],
+        "type": customIncomeTypeValues.reverse[type],
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+    };
+}
+
+enum Status {
+    ACTIVE,
+    INACTIVE
+}
+
+final statusValues = EnumValues({
+    "active": Status.ACTIVE,
+    "inactive": Status.INACTIVE
+});
+
+enum CustomIncomeType {
+    PUBLIC,
+    OTHER
+}
+
+final customIncomeTypeValues = EnumValues({
+    "public": CustomIncomeType.PUBLIC,
+    "other": CustomIncomeType.OTHER
+});
+
+enum ResultType {
+    FINANCIAL_DATA_NGO,
+    FINANCIAL_DATA_LAWYER,
+    FINANCIAL_DATA_TRADE_ASSOCIATION
+}
+
+final resultTypeValues = EnumValues({
+    "FinancialDataNGO": ResultType.FINANCIAL_DATA_NGO,
+    "FinancialDataLawyer": ResultType.FINANCIAL_DATA_LAWYER,
+    "FinancialDataTradeAssociation": ResultType.FINANCIAL_DATA_TRADE_ASSOCIATION
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/33d2e.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/33d2e.json/default/TopLevel.dart
new file mode 100644
index 0000000..2e00ac9
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/33d2e.json/default/TopLevel.dart
@@ -0,0 +1,203 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Laureate> laureates;
+
+    TopLevel({
+        required this.laureates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        laureates: List<Laureate>.from(json["laureates"].map((x) => Laureate.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "laureates": List<dynamic>.from(laureates.map((x) => x.toJson())),
+    };
+}
+
+class Laureate {
+    final dynamic born;
+    final String? bornCity;
+    final String? bornCountry;
+    final String? bornCountryCode;
+    final dynamic died;
+    final String? diedCity;
+    final String? diedCountry;
+    final String? diedCountryCode;
+    final String? firstname;
+    final Gender gender;
+    final String id;
+    final List<Prize> prizes;
+    final String? surname;
+
+    Laureate({
+        required this.born,
+        this.bornCity,
+        this.bornCountry,
+        this.bornCountryCode,
+        required this.died,
+        this.diedCity,
+        this.diedCountry,
+        this.diedCountryCode,
+        this.firstname,
+        required this.gender,
+        required this.id,
+        required this.prizes,
+        this.surname,
+    });
+
+    factory Laureate.fromJson(Map<String, dynamic> json) => Laureate(
+        born: json["born"],
+        bornCity: json["bornCity"],
+        bornCountry: json["bornCountry"],
+        bornCountryCode: json["bornCountryCode"],
+        died: json["died"],
+        diedCity: json["diedCity"],
+        diedCountry: json["diedCountry"],
+        diedCountryCode: json["diedCountryCode"],
+        firstname: json["firstname"],
+        gender: genderValues.map[json["gender"]]!,
+        id: json["id"],
+        prizes: List<Prize>.from(json["prizes"].map((x) => Prize.fromJson(x))),
+        surname: json["surname"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "born": born,
+        "bornCity": bornCity,
+        "bornCountry": bornCountry,
+        "bornCountryCode": bornCountryCode,
+        "died": died,
+        "diedCity": diedCity,
+        "diedCountry": diedCountry,
+        "diedCountryCode": diedCountryCode,
+        "firstname": firstname,
+        "gender": genderValues.reverse[gender],
+        "id": id,
+        "prizes": List<dynamic>.from(prizes.map((x) => x.toJson())),
+        "surname": surname,
+    };
+}
+
+enum BornEnum {
+    THE_00000000,
+    THE_18980000,
+    THE_19430000
+}
+
+final bornEnumValues = EnumValues({
+    "0000-00-00": BornEnum.THE_00000000,
+    "1898-00-00": BornEnum.THE_18980000,
+    "1943-00-00": BornEnum.THE_19430000
+});
+
+enum Gender {
+    MALE,
+    FEMALE,
+    ORG
+}
+
+final genderValues = EnumValues({
+    "male": Gender.MALE,
+    "female": Gender.FEMALE,
+    "org": Gender.ORG
+});
+
+class Prize {
+    final List<dynamic> affiliations;
+    final Category? category;
+    final String? motivation;
+    final String? overallMotivation;
+    final String? share;
+    final String? year;
+
+    Prize({
+        required this.affiliations,
+        this.category,
+        this.motivation,
+        this.overallMotivation,
+        this.share,
+        this.year,
+    });
+
+    factory Prize.fromJson(Map<String, dynamic> json) => Prize(
+        affiliations: List<dynamic>.from(json["affiliations"].map((x) => x)),
+        category: categoryValues.map[json["category"]],
+        motivation: json["motivation"],
+        overallMotivation: json["overallMotivation"],
+        share: json["share"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "affiliations": List<dynamic>.from(affiliations.map((x) => x)),
+        "category": categoryValues.reverse[category],
+        "motivation": motivation,
+        "overallMotivation": overallMotivation,
+        "share": share,
+        "year": year,
+    };
+}
+
+class AffiliationClass {
+    final String? city;
+    final String? country;
+    final String? name;
+
+    AffiliationClass({
+        this.city,
+        this.country,
+        this.name,
+    });
+
+    factory AffiliationClass.fromJson(Map<String, dynamic> json) => AffiliationClass(
+        city: json["city"],
+        country: json["country"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "name": name,
+    };
+}
+
+enum Category {
+    PHYSICS,
+    CHEMISTRY,
+    PEACE,
+    MEDICINE,
+    LITERATURE,
+    ECONOMICS
+}
+
+final categoryValues = EnumValues({
+    "physics": Category.PHYSICS,
+    "chemistry": Category.CHEMISTRY,
+    "peace": Category.PEACE,
+    "medicine": Category.MEDICINE,
+    "literature": Category.LITERATURE,
+    "economics": Category.ECONOMICS
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/34702.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/34702.json/default/TopLevel.dart
new file mode 100644
index 0000000..7c71ae7
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/34702.json/default/TopLevel.dart
@@ -0,0 +1,311 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Crs crs;
+    final List<Feature> features;
+    final int totalFeatures;
+    final String type;
+
+    TopLevel({
+        required this.crs,
+        required this.features,
+        required this.totalFeatures,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        crs: Crs.fromJson(json["crs"]),
+        features: List<Feature>.from(json["features"].map((x) => Feature.fromJson(x))),
+        totalFeatures: json["totalFeatures"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "crs": crs.toJson(),
+        "features": List<dynamic>.from(features.map((x) => x.toJson())),
+        "totalFeatures": totalFeatures,
+        "type": type,
+    };
+}
+
+class Crs {
+    final CrsProperties properties;
+    final String type;
+
+    Crs({
+        required this.properties,
+        required this.type,
+    });
+
+    factory Crs.fromJson(Map<String, dynamic> json) => Crs(
+        properties: CrsProperties.fromJson(json["properties"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+        "type": type,
+    };
+}
+
+class CrsProperties {
+    final String name;
+
+    CrsProperties({
+        required this.name,
+    });
+
+    factory CrsProperties.fromJson(Map<String, dynamic> json) => CrsProperties(
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+    };
+}
+
+class Feature {
+    final Geometry geometry;
+    final GeometryName geometryName;
+    final String id;
+    final FeatureProperties properties;
+    final FeatureType type;
+
+    Feature({
+        required this.geometry,
+        required this.geometryName,
+        required this.id,
+        required this.properties,
+        required this.type,
+    });
+
+    factory Feature.fromJson(Map<String, dynamic> json) => Feature(
+        geometry: Geometry.fromJson(json["geometry"]),
+        geometryName: geometryNameValues.map[json["geometry_name"]]!,
+        id: json["id"],
+        properties: FeatureProperties.fromJson(json["properties"]),
+        type: featureTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "geometry": geometry.toJson(),
+        "geometry_name": geometryNameValues.reverse[geometryName],
+        "id": id,
+        "properties": properties.toJson(),
+        "type": featureTypeValues.reverse[type],
+    };
+}
+
+class Geometry {
+    final List<double> coordinates;
+    final GeometryType type;
+
+    Geometry({
+        required this.coordinates,
+        required this.type,
+    });
+
+    factory Geometry.fromJson(Map<String, dynamic> json) => Geometry(
+        coordinates: List<double>.from(json["coordinates"].map((x) => x?.toDouble())),
+        type: geometryTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "coordinates": List<dynamic>.from(coordinates.map((x) => x)),
+        "type": geometryTypeValues.reverse[type],
+    };
+}
+
+enum GeometryType {
+    POINT
+}
+
+final geometryTypeValues = EnumValues({
+    "Point": GeometryType.POINT
+});
+
+enum GeometryName {
+    GEOM
+}
+
+final geometryNameValues = EnumValues({
+    "geom": GeometryName.GEOM
+});
+
+class FeatureProperties {
+    final String division;
+    final double fax;
+    final FireBanR? fireBanR;
+    final double latitude;
+    final String localGovt;
+    final double longitude;
+    final String? no;
+    final double phone;
+    final int postcode;
+    final String psa;
+    final Region region;
+    final String station;
+    final String street;
+    final String suburb;
+    final PropertiesType? type;
+
+    FeatureProperties({
+        required this.division,
+        required this.fax,
+        required this.fireBanR,
+        required this.latitude,
+        required this.localGovt,
+        required this.longitude,
+        required this.no,
+        required this.phone,
+        required this.postcode,
+        required this.psa,
+        required this.region,
+        required this.station,
+        required this.street,
+        required this.suburb,
+        required this.type,
+    });
+
+    factory FeatureProperties.fromJson(Map<String, dynamic> json) => FeatureProperties(
+        division: json["division"],
+        fax: json["fax"]?.toDouble(),
+        fireBanR: fireBanRValues.map[json["fire_ban_r"]],
+        latitude: json["latitude"]?.toDouble(),
+        localGovt: json["local_govt"],
+        longitude: json["longitude"]?.toDouble(),
+        no: json["no"],
+        phone: json["phone"]?.toDouble(),
+        postcode: json["postcode"],
+        psa: json["psa"],
+        region: regionValues.map[json["region"]]!,
+        station: json["station"],
+        street: json["street"],
+        suburb: json["suburb"],
+        type: propertiesTypeValues.map[json["type"]],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "division": division,
+        "fax": fax,
+        "fire_ban_r": fireBanRValues.reverse[fireBanR],
+        "latitude": latitude,
+        "local_govt": localGovt,
+        "longitude": longitude,
+        "no": no,
+        "phone": phone,
+        "postcode": postcode,
+        "psa": psa,
+        "region": regionValues.reverse[region],
+        "station": station,
+        "street": street,
+        "suburb": suburb,
+        "type": propertiesTypeValues.reverse[type],
+    };
+}
+
+enum FireBanR {
+    NORTH_CENTRAL,
+    CENTRAL,
+    SOUTH_WEST,
+    WIMMERA,
+    NORTHERN_COUNTRY,
+    EAST_GIPPSLAND,
+    NORTH_EAST,
+    MALLEE,
+    WEST_SOUTH_GIPPSLAND,
+    BALLARAT
+}
+
+final fireBanRValues = EnumValues({
+    "North Central": FireBanR.NORTH_CENTRAL,
+    "Central": FireBanR.CENTRAL,
+    "South West": FireBanR.SOUTH_WEST,
+    "Wimmera": FireBanR.WIMMERA,
+    "Northern Country": FireBanR.NORTHERN_COUNTRY,
+    "East Gippsland": FireBanR.EAST_GIPPSLAND,
+    "North East": FireBanR.NORTH_EAST,
+    "Mallee": FireBanR.MALLEE,
+    "West &South Gippsland": FireBanR.WEST_SOUTH_GIPPSLAND,
+    "Ballarat": FireBanR.BALLARAT
+});
+
+enum Region {
+    EASTERN,
+    NORTHERN_METRO,
+    WESTERN,
+    SOUTHERN_METRO
+}
+
+final regionValues = EnumValues({
+    "Eastern": Region.EASTERN,
+    "Northern Metro": Region.NORTHERN_METRO,
+    "Western": Region.WESTERN,
+    "Southern Metro": Region.SOUTHERN_METRO
+});
+
+enum PropertiesType {
+    STREET,
+    AVENUE,
+    ROAD,
+    HIGHWAY,
+    BOULEVARD,
+    COURT,
+    WAY,
+    DRIVE,
+    SOUTH,
+    HILL,
+    LANE,
+    CLOSE,
+    PARADE,
+    TYPE_ROAD,
+    PLACE,
+    RD
+}
+
+final propertiesTypeValues = EnumValues({
+    "STREET": PropertiesType.STREET,
+    "AVENUE": PropertiesType.AVENUE,
+    "ROAD": PropertiesType.ROAD,
+    "HIGHWAY": PropertiesType.HIGHWAY,
+    "BOULEVARD": PropertiesType.BOULEVARD,
+    "COURT": PropertiesType.COURT,
+    "WAY": PropertiesType.WAY,
+    "DRIVE": PropertiesType.DRIVE,
+    "SOUTH": PropertiesType.SOUTH,
+    "HILL": PropertiesType.HILL,
+    "LANE": PropertiesType.LANE,
+    "CLOSE": PropertiesType.CLOSE,
+    "PARADE": PropertiesType.PARADE,
+    "Road": PropertiesType.TYPE_ROAD,
+    "PLACE": PropertiesType.PLACE,
+    "RD": PropertiesType.RD
+});
+
+enum FeatureType {
+    FEATURE
+}
+
+final featureTypeValues = EnumValues({
+    "Feature": FeatureType.FEATURE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/3536b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3536b.json/default/TopLevel.dart
new file mode 100644
index 0000000..b9d6609
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/3536b.json/default/TopLevel.dart
@@ -0,0 +1,153 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final String supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    SPDX,
+    DEP5,
+    TROVE
+}
+
+final schemeValues = EnumValues({
+    "SPDX": Scheme.SPDX,
+    "DEP5": Scheme.DEP5,
+    "Trove": Scheme.TROVE
+});
+
+enum Keyword {
+    DISCOURAGED,
+    OBSOLETE,
+    OSI_APPROVED
+}
+
+final keywordValues = EnumValues({
+    "discouraged": Keyword.DISCOURAGED,
+    "obsolete": Keyword.OBSOLETE,
+    "osi-approved": Keyword.OSI_APPROVED
+});
+
+class Link {
+    final String note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: json["note"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": note,
+        "url": url,
+    };
+}
+
+class Text {
+    final String mediaType;
+    final String title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: json["media_type"],
+        title: json["title"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaType,
+        "title": title,
+        "url": url,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/36d5d.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/36d5d.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/36d5d.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/3a6b3.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3a6b3.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/3a6b3.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/3e9a3.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3e9a3.json/default/TopLevel.dart
new file mode 100644
index 0000000..2c2ac1d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/3e9a3.json/default/TopLevel.dart
@@ -0,0 +1,125 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<dynamic> message;
+    final int responseTime;
+    final Results results;
+    final String status;
+
+    TopLevel({
+        required this.message,
+        required this.responseTime,
+        required this.results,
+        required this.status,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        message: List<dynamic>.from(json["message"].map((x) => x)),
+        responseTime: json["responseTime"],
+        results: Results.fromJson(json["Results"]),
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "message": List<dynamic>.from(message.map((x) => x)),
+        "responseTime": responseTime,
+        "Results": results.toJson(),
+        "status": status,
+    };
+}
+
+class Results {
+    final List<Series> series;
+
+    Results({
+        required this.series,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        series: List<Series>.from(json["series"].map((x) => Series.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "series": List<dynamic>.from(series.map((x) => x.toJson())),
+    };
+}
+
+class Series {
+    final List<Datum> data;
+    final String seriesId;
+
+    Series({
+        required this.data,
+        required this.seriesId,
+    });
+
+    factory Series.fromJson(Map<String, dynamic> json) => Series(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        seriesId: json["seriesID"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "seriesID": seriesId,
+    };
+}
+
+class Datum {
+    final List<Footnote> footnotes;
+    final String period;
+    final String periodName;
+    final String value;
+    final String year;
+
+    Datum({
+        required this.footnotes,
+        required this.period,
+        required this.periodName,
+        required this.value,
+        required this.year,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        footnotes: List<Footnote>.from(json["footnotes"].map((x) => Footnote.fromJson(x))),
+        period: json["period"],
+        periodName: json["periodName"],
+        value: json["value"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "footnotes": List<dynamic>.from(footnotes.map((x) => x.toJson())),
+        "period": period,
+        "periodName": periodName,
+        "value": value,
+        "year": year,
+    };
+}
+
+class Footnote {
+    final String? code;
+    final String? text;
+
+    Footnote({
+        this.code,
+        this.text,
+    });
+
+    factory Footnote.fromJson(Map<String, dynamic> json) => Footnote(
+        code: json["code"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "text": text,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart
new file mode 100644
index 0000000..037c9d2
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart
@@ -0,0 +1,437 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final Text text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": textValues.reverse[text],
+    };
+}
+
+enum Text {
+    THUNDERSTORMS
+}
+
+final textValues = EnumValues({
+    "Thunderstorms": Text.THUNDERSTORMS
+});
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/421d4.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/421d4.json/default/TopLevel.dart
new file mode 100644
index 0000000..172ed18
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/421d4.json/default/TopLevel.dart
@@ -0,0 +1,471 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final String attribution;
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String description;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final License license;
+    final String licenseId;
+    final String locale;
+    final Metadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final String rowClass;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final List<String> tags;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.attribution,
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.description,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.license,
+        required this.licenseId,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowClass,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.tags,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        attribution: json["attribution"],
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        description: json["description"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        license: License.fromJson(json["license"]),
+        licenseId: json["licenseId"],
+        locale: json["locale"],
+        metadata: Metadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowClass: json["rowClass"],
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attribution": attribution,
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "description": description,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "license": license.toJson(),
+        "licenseId": licenseId,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowClass": rowClass,
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final String dataTypeName;
+    final String fieldName;
+    final List<String>? flags;
+    final Query format;
+    final int id;
+    final String name;
+    final int position;
+    final String renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: json["dataTypeName"],
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Query.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: json["renderTypeName"],
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": dataTypeName,
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": renderTypeName,
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final String? average;
+    final int cachedContentsNull;
+    final String? largest;
+    final int nonNull;
+    final String? smallest;
+    final String? sum;
+    final List<Top>? top;
+
+    CachedContents({
+        this.average,
+        required this.cachedContentsNull,
+        this.largest,
+        required this.nonNull,
+        this.smallest,
+        this.sum,
+        this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        average: json["average"],
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        sum: json["sum"],
+        top: json["top"] == null ? null : List<Top>.from(json["top"]!.map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "average": average,
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "sum": sum,
+        "top": top == null ? null : List<dynamic>.from(top!.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+class Query {
+    Query();
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class License {
+    final String name;
+
+    License({
+        required this.name,
+    });
+
+    factory License.fromJson(Map<String, dynamic> json) => License(
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+    };
+}
+
+class Metadata {
+    final List<String> availableDisplayTypes;
+    final String rdfClass;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+    final String rowIdentifier;
+
+    Metadata({
+        required this.availableDisplayTypes,
+        required this.rdfClass,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+        required this.rowIdentifier,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        rdfClass: json["rdfClass"],
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+        rowIdentifier: json["rowIdentifier"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "rdfClass": rdfClass,
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+        "rowIdentifier": rowIdentifier,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "screenName": screenName,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/437e7.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/437e7.json/default/TopLevel.dart
new file mode 100644
index 0000000..219f6d2
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/437e7.json/default/TopLevel.dart
@@ -0,0 +1,459 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final String username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": username,
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    G,
+    PG,
+    Y,
+    PG_13
+}
+
+final ratingValues = EnumValues({
+    "g": Rating.G,
+    "pg": Rating.PG,
+    "y": Rating.Y,
+    "pg-13": Rating.PG_13
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String twitter;
+    final String username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        required this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": username,
+    };
+}
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/43970.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/43970.json/default/TopLevel.dart
new file mode 100644
index 0000000..2dae839
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/43970.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int id;
+    final String name;
+    final String notes;
+
+    TopLevel({
+        required this.id,
+        required this.name,
+        required this.notes,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["ID"],
+        name: json["Name"],
+        notes: json["Notes"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ID": id,
+        "Name": name,
+        "Notes": notes,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/458db.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/458db.json/default/TopLevel.dart
new file mode 100644
index 0000000..ac0e1c4
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/458db.json/default/TopLevel.dart
@@ -0,0 +1,201 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Metadata metadata;
+    final List<Result> results;
+
+    TopLevel({
+        required this.metadata,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        metadata: Metadata.fromJson(json["metadata"]),
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "metadata": metadata.toJson(),
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Metadata {
+    final double executionTime;
+    final ResponseInfo responseInfo;
+    final Resultset resultset;
+
+    Metadata({
+        required this.executionTime,
+        required this.responseInfo,
+        required this.resultset,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        executionTime: json["executionTime"]?.toDouble(),
+        responseInfo: ResponseInfo.fromJson(json["responseInfo"]),
+        resultset: Resultset.fromJson(json["resultset"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "executionTime": executionTime,
+        "responseInfo": responseInfo.toJson(),
+        "resultset": resultset.toJson(),
+    };
+}
+
+class ResponseInfo {
+    final String developerMessage;
+    final int status;
+
+    ResponseInfo({
+        required this.developerMessage,
+        required this.status,
+    });
+
+    factory ResponseInfo.fromJson(Map<String, dynamic> json) => ResponseInfo(
+        developerMessage: json["developerMessage"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "developerMessage": developerMessage,
+        "status": status,
+    };
+}
+
+class Resultset {
+    final int count;
+    final int page;
+    final int pagesize;
+
+    Resultset({
+        required this.count,
+        required this.page,
+        required this.pagesize,
+    });
+
+    factory Resultset.fromJson(Map<String, dynamic> json) => Resultset(
+        count: json["count"],
+        page: json["page"],
+        pagesize: json["pagesize"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "page": page,
+        "pagesize": pagesize,
+    };
+}
+
+class Result {
+    final List<dynamic> attachments;
+    final String body;
+    final String changed;
+    final List<Component> component;
+    final String created;
+    final String date;
+    final List<dynamic> image;
+    final List<dynamic> teaser;
+    final String title;
+    final List<dynamic> topic;
+    final String url;
+    final String uuid;
+    final String vuuid;
+
+    Result({
+        required this.attachments,
+        required this.body,
+        required this.changed,
+        required this.component,
+        required this.created,
+        required this.date,
+        required this.image,
+        required this.teaser,
+        required this.title,
+        required this.topic,
+        required this.url,
+        required this.uuid,
+        required this.vuuid,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        attachments: List<dynamic>.from(json["attachments"].map((x) => x)),
+        body: json["body"],
+        changed: json["changed"],
+        component: List<Component>.from(json["component"].map((x) => Component.fromJson(x))),
+        created: json["created"],
+        date: json["date"],
+        image: List<dynamic>.from(json["image"].map((x) => x)),
+        teaser: List<dynamic>.from(json["teaser"].map((x) => x)),
+        title: json["title"],
+        topic: List<dynamic>.from(json["topic"].map((x) => x)),
+        url: json["url"],
+        uuid: json["uuid"],
+        vuuid: json["vuuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachments": List<dynamic>.from(attachments.map((x) => x)),
+        "body": body,
+        "changed": changed,
+        "component": List<dynamic>.from(component.map((x) => x.toJson())),
+        "created": created,
+        "date": date,
+        "image": List<dynamic>.from(image.map((x) => x)),
+        "teaser": List<dynamic>.from(teaser.map((x) => x)),
+        "title": title,
+        "topic": List<dynamic>.from(topic.map((x) => x)),
+        "url": url,
+        "uuid": uuid,
+        "vuuid": vuuid,
+    };
+}
+
+class Component {
+    final Name name;
+    final String uuid;
+
+    Component({
+        required this.name,
+        required this.uuid,
+    });
+
+    factory Component.fromJson(Map<String, dynamic> json) => Component(
+        name: nameValues.map[json["name"]]!,
+        uuid: json["uuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": nameValues.reverse[name],
+        "uuid": uuid,
+    };
+}
+
+enum Name {
+    OFFICE_ON_VIOLENCE_AGAINST_WOMEN
+}
+
+final nameValues = EnumValues({
+    "Office on Violence Against Women": Name.OFFICE_ON_VIOLENCE_AGAINST_WOMEN
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/4a455.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4a455.json/default/TopLevel.dart
new file mode 100644
index 0000000..021f5a2
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/4a455.json/default/TopLevel.dart
@@ -0,0 +1,197 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Crs crs;
+    final List<Feature> features;
+    final int totalFeatures;
+    final String type;
+
+    TopLevel({
+        required this.crs,
+        required this.features,
+        required this.totalFeatures,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        crs: Crs.fromJson(json["crs"]),
+        features: List<Feature>.from(json["features"].map((x) => Feature.fromJson(x))),
+        totalFeatures: json["totalFeatures"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "crs": crs.toJson(),
+        "features": List<dynamic>.from(features.map((x) => x.toJson())),
+        "totalFeatures": totalFeatures,
+        "type": type,
+    };
+}
+
+class Crs {
+    final CrsProperties properties;
+    final String type;
+
+    Crs({
+        required this.properties,
+        required this.type,
+    });
+
+    factory Crs.fromJson(Map<String, dynamic> json) => Crs(
+        properties: CrsProperties.fromJson(json["properties"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+        "type": type,
+    };
+}
+
+class CrsProperties {
+    final String name;
+
+    CrsProperties({
+        required this.name,
+    });
+
+    factory CrsProperties.fromJson(Map<String, dynamic> json) => CrsProperties(
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+    };
+}
+
+class Feature {
+    final Geometry geometry;
+    final GeometryName geometryName;
+    final String id;
+    final FeatureProperties properties;
+    final FeatureType type;
+
+    Feature({
+        required this.geometry,
+        required this.geometryName,
+        required this.id,
+        required this.properties,
+        required this.type,
+    });
+
+    factory Feature.fromJson(Map<String, dynamic> json) => Feature(
+        geometry: Geometry.fromJson(json["geometry"]),
+        geometryName: geometryNameValues.map[json["geometry_name"]]!,
+        id: json["id"],
+        properties: FeatureProperties.fromJson(json["properties"]),
+        type: featureTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "geometry": geometry.toJson(),
+        "geometry_name": geometryNameValues.reverse[geometryName],
+        "id": id,
+        "properties": properties.toJson(),
+        "type": featureTypeValues.reverse[type],
+    };
+}
+
+class Geometry {
+    final List<List<double>> coordinates;
+    final GeometryType type;
+
+    Geometry({
+        required this.coordinates,
+        required this.type,
+    });
+
+    factory Geometry.fromJson(Map<String, dynamic> json) => Geometry(
+        coordinates: List<List<double>>.from(json["coordinates"].map((x) => List<double>.from(x.map((x) => x?.toDouble())))),
+        type: geometryTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "coordinates": List<dynamic>.from(coordinates.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "type": geometryTypeValues.reverse[type],
+    };
+}
+
+enum GeometryType {
+    MULTI_POINT
+}
+
+final geometryTypeValues = EnumValues({
+    "MultiPoint": GeometryType.MULTI_POINT
+});
+
+enum GeometryName {
+    GEOM
+}
+
+final geometryNameValues = EnumValues({
+    "geom": GeometryName.GEOM
+});
+
+class FeatureProperties {
+    final String facebookaccount;
+    final String frequencyfinderurl;
+    final String name;
+    final String siteurl;
+    final String streetaddress;
+    final String twitteraccount;
+
+    FeatureProperties({
+        required this.facebookaccount,
+        required this.frequencyfinderurl,
+        required this.name,
+        required this.siteurl,
+        required this.streetaddress,
+        required this.twitteraccount,
+    });
+
+    factory FeatureProperties.fromJson(Map<String, dynamic> json) => FeatureProperties(
+        facebookaccount: json["facebookaccount"],
+        frequencyfinderurl: json["frequencyfinderurl"],
+        name: json["name"],
+        siteurl: json["siteurl"],
+        streetaddress: json["streetaddress"],
+        twitteraccount: json["twitteraccount"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "facebookaccount": facebookaccount,
+        "frequencyfinderurl": frequencyfinderurl,
+        "name": name,
+        "siteurl": siteurl,
+        "streetaddress": streetaddress,
+        "twitteraccount": twitteraccount,
+    };
+}
+
+enum FeatureType {
+    FEATURE
+}
+
+final featureTypeValues = EnumValues({
+    "Feature": FeatureType.FEATURE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/4d6fb.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4d6fb.json/default/TopLevel.dart
new file mode 100644
index 0000000..b62c3f1
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/4d6fb.json/default/TopLevel.dart
@@ -0,0 +1,601 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final dynamic authorFlairCssClass;
+    final dynamic authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final dynamic distinguished;
+    final String domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final dynamic linkFlairCssClass;
+    final dynamic linkFlairText;
+    final bool locked;
+    final Media? media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final PostHint? postHint;
+    final Preview? preview;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final Media? secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final dynamic selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final dynamic suggestedSort;
+    final String thumbnail;
+    final int? thumbnailHeight;
+    final int? thumbnailWidth;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        this.postHint,
+        this.preview,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.thumbnailHeight,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: json["domain"],
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"] == null ? null : Media.fromJson(json["media"]),
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        postHint: postHintValues.map[json["post_hint"]],
+        preview: json["preview"] == null ? null : Preview.fromJson(json["preview"]),
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"] == null ? null : Media.fromJson(json["secure_media"]),
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domain,
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media?.toJson(),
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "post_hint": postHintValues.reverse[postHint],
+        "preview": preview?.toJson(),
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia?.toJson(),
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+class Media {
+    final Oembed oembed;
+    final String type;
+
+    Media({
+        required this.oembed,
+        required this.type,
+    });
+
+    factory Media.fromJson(Map<String, dynamic> json) => Media(
+        oembed: Oembed.fromJson(json["oembed"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "oembed": oembed.toJson(),
+        "type": type,
+    };
+}
+
+class Oembed {
+    final String authorName;
+    final String authorUrl;
+    final int height;
+    final String html;
+    final String providerName;
+    final String providerUrl;
+    final int thumbnailHeight;
+    final String thumbnailUrl;
+    final int thumbnailWidth;
+    final String title;
+    final String type;
+    final String version;
+    final int width;
+
+    Oembed({
+        required this.authorName,
+        required this.authorUrl,
+        required this.height,
+        required this.html,
+        required this.providerName,
+        required this.providerUrl,
+        required this.thumbnailHeight,
+        required this.thumbnailUrl,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.type,
+        required this.version,
+        required this.width,
+    });
+
+    factory Oembed.fromJson(Map<String, dynamic> json) => Oembed(
+        authorName: json["author_name"],
+        authorUrl: json["author_url"],
+        height: json["height"],
+        html: json["html"],
+        providerName: json["provider_name"],
+        providerUrl: json["provider_url"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailUrl: json["thumbnail_url"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        type: json["type"],
+        version: json["version"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "author_name": authorName,
+        "author_url": authorUrl,
+        "height": height,
+        "html": html,
+        "provider_name": providerName,
+        "provider_url": providerUrl,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_url": thumbnailUrl,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "type": type,
+        "version": version,
+        "width": width,
+    };
+}
+
+class MediaEmbed {
+    final String? content;
+    final int? height;
+    final bool? scrolling;
+    final int? width;
+
+    MediaEmbed({
+        this.content,
+        this.height,
+        this.scrolling,
+        this.width,
+    });
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+        content: json["content"],
+        height: json["height"],
+        scrolling: json["scrolling"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "content": content,
+        "height": height,
+        "scrolling": scrolling,
+        "width": width,
+    };
+}
+
+enum PostHint {
+    RICH_VIDEO,
+    LINK
+}
+
+final postHintValues = EnumValues({
+    "rich:video": PostHint.RICH_VIDEO,
+    "link": PostHint.LINK
+});
+
+class Preview {
+    final bool enabled;
+    final List<Image> images;
+
+    Preview({
+        required this.enabled,
+        required this.images,
+    });
+
+    factory Preview.fromJson(Map<String, dynamic> json) => Preview(
+        enabled: json["enabled"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "enabled": enabled,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+    };
+}
+
+class Image {
+    final String id;
+    final List<Source> resolutions;
+    final Source source;
+    final Variants variants;
+
+    Image({
+        required this.id,
+        required this.resolutions,
+        required this.source,
+        required this.variants,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        id: json["id"],
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+        variants: Variants.fromJson(json["variants"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+        "variants": variants.toJson(),
+    };
+}
+
+class Source {
+    final int height;
+    final String url;
+    final int width;
+
+    Source({
+        required this.height,
+        required this.url,
+        required this.width,
+    });
+
+    factory Source.fromJson(Map<String, dynamic> json) => Source(
+        height: json["height"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Variants {
+    Variants();
+
+    factory Variants.fromJson(Map<String, dynamic> json) => Variants(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+enum Subreddit {
+    TODAYILEARNED
+}
+
+final subredditValues = EnumValues({
+    "todayilearned": Subreddit.TODAYILEARNED
+});
+
+enum SubredditId {
+    T5_2_QQJC
+}
+
+final subredditIdValues = EnumValues({
+    "t5_2qqjc": SubredditId.T5_2_QQJC
+});
+
+enum SubredditNamePrefixed {
+    R_TODAYILEARNED
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/todayilearned": SubredditNamePrefixed.R_TODAYILEARNED
+});
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/54147.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/54147.json/default/TopLevel.dart
new file mode 100644
index 0000000..b0a00de
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/54147.json/default/TopLevel.dart
@@ -0,0 +1,87 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Args args;
+    final String data;
+    final Args files;
+    final Args form;
+    final Headers headers;
+    final String origin;
+    final String url;
+
+    TopLevel({
+        required this.args,
+        required this.data,
+        required this.files,
+        required this.form,
+        required this.headers,
+        required this.origin,
+        required this.url,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        args: Args.fromJson(json["args"]),
+        data: json["data"],
+        files: Args.fromJson(json["files"]),
+        form: Args.fromJson(json["form"]),
+        headers: Headers.fromJson(json["headers"]),
+        origin: json["origin"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "args": args.toJson(),
+        "data": data,
+        "files": files.toJson(),
+        "form": form.toJson(),
+        "headers": headers.toJson(),
+        "origin": origin,
+        "url": url,
+    };
+}
+
+class Args {
+    Args();
+
+    factory Args.fromJson(Map<String, dynamic> json) => Args(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Headers {
+    final String acceptEncoding;
+    final String connection;
+    final String host;
+    final String userAgent;
+
+    Headers({
+        required this.acceptEncoding,
+        required this.connection,
+        required this.host,
+        required this.userAgent,
+    });
+
+    factory Headers.fromJson(Map<String, dynamic> json) => Headers(
+        acceptEncoding: json["Accept-Encoding"],
+        connection: json["Connection"],
+        host: json["Host"],
+        userAgent: json["User-Agent"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Accept-Encoding": acceptEncoding,
+        "Connection": connection,
+        "Host": host,
+        "User-Agent": userAgent,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart
new file mode 100644
index 0000000..d16ff46
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart
@@ -0,0 +1,117 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final String next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final DateTime createdAt;
+    final String id;
+    final String personId;
+    final String representativeId;
+    final Status status;
+    final DateTime updatedAt;
+
+    Result({
+        required this.createdAt,
+        required this.id,
+        required this.personId,
+        required this.representativeId,
+        required this.status,
+        required this.updatedAt,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        createdAt: DateTime.parse(json["created_at"]),
+        id: json["id"],
+        personId: json["person_id"],
+        representativeId: json["representative_id"],
+        status: statusValues.map[json["status"]]!,
+        updatedAt: DateTime.parse(json["updated_at"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "created_at": createdAt.toIso8601String(),
+        "id": id,
+        "person_id": personId,
+        "representative_id": representativeId,
+        "status": statusValues.reverse[status],
+        "updated_at": updatedAt.toIso8601String(),
+    };
+}
+
+enum Status {
+    INACTIVE,
+    ACTIVE
+}
+
+final statusValues = EnumValues({
+    "inactive": Status.INACTIVE,
+    "active": Status.ACTIVE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/570ec.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/570ec.json/default/TopLevel.dart
new file mode 100644
index 0000000..44cdd8d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/570ec.json/default/TopLevel.dart
@@ -0,0 +1,161 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<String> keywords;
+    final List<Link> links;
+    final String name;
+    final List<OtherName> otherNames;
+    final dynamic supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<String>.from(json["keywords"].map((x) => x)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<OtherName>.from(json["other_names"].map((x) => OtherName.fromJson(x))),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => x)),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x.toJson())),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    DEP5,
+    SPDX,
+    TROVE
+}
+
+final schemeValues = EnumValues({
+    "DEP5": Scheme.DEP5,
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE
+});
+
+class Link {
+    final String note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: json["note"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": note,
+        "url": url,
+    };
+}
+
+class OtherName {
+    final String name;
+    final String? note;
+
+    OtherName({
+        required this.name,
+        required this.note,
+    });
+
+    factory OtherName.fromJson(Map<String, dynamic> json) => OtherName(
+        name: json["name"],
+        note: json["note"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "note": note,
+    };
+}
+
+class Text {
+    final String mediaType;
+    final String title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: json["media_type"],
+        title: json["title"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaType,
+        "title": title,
+        "url": url,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/5dd0d.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5dd0d.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/5dd0d.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart
new file mode 100644
index 0000000..f1df9d0
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart
@@ -0,0 +1,37 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final DateTime date;
+    final int id;
+    final String sponsor;
+    final String title;
+
+    TopLevel({
+        required this.date,
+        required this.id,
+        required this.sponsor,
+        required this.title,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        date: DateTime.parse(json["Date"]),
+        id: json["ID"],
+        sponsor: json["Sponsor"],
+        title: json["Title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Date": date.toIso8601String(),
+        "ID": id,
+        "Sponsor": sponsor,
+        "Title": title,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/5eb20.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5eb20.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/5eb20.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/5f7fe.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5f7fe.json/default/TopLevel.dart
new file mode 100644
index 0000000..bfbc976
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/5f7fe.json/default/TopLevel.dart
@@ -0,0 +1,773 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final String attribution;
+    final String attributionLink;
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String description;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final String locale;
+    final Metadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final List<String> tags;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.attribution,
+        required this.attributionLink,
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.description,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.tags,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        attribution: json["attribution"],
+        attributionLink: json["attributionLink"],
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        description: json["description"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        locale: json["locale"],
+        metadata: Metadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attribution": attribution,
+        "attributionLink": attributionLink,
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "description": description,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final TypeName dataTypeName;
+    final String fieldName;
+    final List<String>? flags;
+    final Format format;
+    final int id;
+    final String name;
+    final int position;
+    final TypeName renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: typeNameValues.map[json["dataTypeName"]]!,
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Format.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: typeNameValues.map[json["renderTypeName"]]!,
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": typeNameValues.reverse[dataTypeName],
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": typeNameValues.reverse[renderTypeName],
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final int cachedContentsNull;
+    final String largest;
+    final int nonNull;
+    final String smallest;
+    final List<Top> top;
+
+    CachedContents({
+        required this.cachedContentsNull,
+        required this.largest,
+        required this.nonNull,
+        required this.smallest,
+        required this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        top: List<Top>.from(json["top"].map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "top": List<dynamic>.from(top.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+enum TypeName {
+    META_DATA,
+    CALENDAR_DATE,
+    TEXT
+}
+
+final typeNameValues = EnumValues({
+    "meta_data": TypeName.META_DATA,
+    "calendar_date": TypeName.CALENDAR_DATE,
+    "text": TypeName.TEXT
+});
+
+class Format {
+    final String? align;
+    final String? view;
+
+    Format({
+        this.align,
+        this.view,
+    });
+
+    factory Format.fromJson(Map<String, dynamic> json) => Format(
+        align: json["align"],
+        view: json["view"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "align": align,
+        "view": view,
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class Metadata {
+    final List<Attachment> attachments;
+    final List<String> availableDisplayTypes;
+    final CustomFields customFields;
+    final JsonQuery jsonQuery;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+
+    Metadata({
+        required this.attachments,
+        required this.availableDisplayTypes,
+        required this.customFields,
+        required this.jsonQuery,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        attachments: List<Attachment>.from(json["attachments"].map((x) => Attachment.fromJson(x))),
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        customFields: CustomFields.fromJson(json["custom_fields"]),
+        jsonQuery: JsonQuery.fromJson(json["jsonQuery"]),
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachments": List<dynamic>.from(attachments.map((x) => x.toJson())),
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "custom_fields": customFields.toJson(),
+        "jsonQuery": jsonQuery.toJson(),
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+    };
+}
+
+class Attachment {
+    final String assetId;
+    final String blobId;
+    final String filename;
+    final String name;
+
+    Attachment({
+        required this.assetId,
+        required this.blobId,
+        required this.filename,
+        required this.name,
+    });
+
+    factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
+        assetId: json["assetId"],
+        blobId: json["blobId"],
+        filename: json["filename"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "assetId": assetId,
+        "blobId": blobId,
+        "filename": filename,
+        "name": name,
+    };
+}
+
+class CustomFields {
+    final AdditionalResources additionalResources;
+    final CommonCore commonCore;
+    final DatasetInformation datasetInformation;
+    final DatasetSummary datasetSummary;
+    final Notes notes;
+
+    CustomFields({
+        required this.additionalResources,
+        required this.commonCore,
+        required this.datasetInformation,
+        required this.datasetSummary,
+        required this.notes,
+    });
+
+    factory CustomFields.fromJson(Map<String, dynamic> json) => CustomFields(
+        additionalResources: AdditionalResources.fromJson(json["Additional Resources"]),
+        commonCore: CommonCore.fromJson(json["Common Core"]),
+        datasetInformation: DatasetInformation.fromJson(json["Dataset Information"]),
+        datasetSummary: DatasetSummary.fromJson(json["Dataset Summary"]),
+        notes: Notes.fromJson(json["Notes"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Additional Resources": additionalResources.toJson(),
+        "Common Core": commonCore.toJson(),
+        "Dataset Information": datasetInformation.toJson(),
+        "Dataset Summary": datasetSummary.toJson(),
+        "Notes": notes.toJson(),
+    };
+}
+
+class AdditionalResources {
+    final String additionalResourcesSeeAlso;
+    final String seeAlso;
+
+    AdditionalResources({
+        required this.additionalResourcesSeeAlso,
+        required this.seeAlso,
+    });
+
+    factory AdditionalResources.fromJson(Map<String, dynamic> json) => AdditionalResources(
+        additionalResourcesSeeAlso: json["See Also "],
+        seeAlso: json["See Also"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "See Also ": additionalResourcesSeeAlso,
+        "See Also": seeAlso,
+    };
+}
+
+class CommonCore {
+    final String contactEmail;
+    final String contactName;
+    final String publisher;
+
+    CommonCore({
+        required this.contactEmail,
+        required this.contactName,
+        required this.publisher,
+    });
+
+    factory CommonCore.fromJson(Map<String, dynamic> json) => CommonCore(
+        contactEmail: json["Contact Email"],
+        contactName: json["Contact Name"],
+        publisher: json["Publisher"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Email": contactEmail,
+        "Contact Name": contactName,
+        "Publisher": publisher,
+    };
+}
+
+class DatasetInformation {
+    final String agency;
+
+    DatasetInformation({
+        required this.agency,
+    });
+
+    factory DatasetInformation.fromJson(Map<String, dynamic> json) => DatasetInformation(
+        agency: json["Agency"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Agency": agency,
+    };
+}
+
+class DatasetSummary {
+    final String contactInformation;
+    final String coverage;
+    final String dataFrequency;
+    final String datasetOwner;
+    final String granularity;
+    final String organization;
+    final String postingFrequency;
+    final String timePeriod;
+    final String units;
+
+    DatasetSummary({
+        required this.contactInformation,
+        required this.coverage,
+        required this.dataFrequency,
+        required this.datasetOwner,
+        required this.granularity,
+        required this.organization,
+        required this.postingFrequency,
+        required this.timePeriod,
+        required this.units,
+    });
+
+    factory DatasetSummary.fromJson(Map<String, dynamic> json) => DatasetSummary(
+        contactInformation: json["Contact Information"],
+        coverage: json["Coverage"],
+        dataFrequency: json["Data Frequency"],
+        datasetOwner: json["Dataset Owner"],
+        granularity: json["Granularity"],
+        organization: json["Organization"],
+        postingFrequency: json["Posting Frequency"],
+        timePeriod: json["Time Period"],
+        units: json["Units"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Information": contactInformation,
+        "Coverage": coverage,
+        "Data Frequency": dataFrequency,
+        "Dataset Owner": datasetOwner,
+        "Granularity": granularity,
+        "Organization": organization,
+        "Posting Frequency": postingFrequency,
+        "Time Period": timePeriod,
+        "Units": units,
+    };
+}
+
+class Notes {
+    final String notes;
+
+    Notes({
+        required this.notes,
+    });
+
+    factory Notes.fromJson(Map<String, dynamic> json) => Notes(
+        notes: json["Notes"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Notes": notes,
+    };
+}
+
+class JsonQuery {
+    final List<Order> order;
+
+    JsonQuery({
+        required this.order,
+    });
+
+    factory JsonQuery.fromJson(Map<String, dynamic> json) => JsonQuery(
+        order: List<Order>.from(json["order"].map((x) => Order.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "order": List<dynamic>.from(order.map((x) => x.toJson())),
+    };
+}
+
+class Order {
+    final bool ascending;
+    final String columnFieldName;
+
+    Order({
+        required this.ascending,
+        required this.columnFieldName,
+    });
+
+    factory Order.fromJson(Map<String, dynamic> json) => Order(
+        ascending: json["ascending"],
+        columnFieldName: json["columnFieldName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "columnFieldName": columnFieldName,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String profileImageUrlLarge;
+    final String profileImageUrlMedium;
+    final String profileImageUrlSmall;
+    final List<String> rights;
+    final String roleName;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.profileImageUrlLarge,
+        required this.profileImageUrlMedium,
+        required this.profileImageUrlSmall,
+        required this.rights,
+        required this.roleName,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        profileImageUrlLarge: json["profileImageUrlLarge"],
+        profileImageUrlMedium: json["profileImageUrlMedium"],
+        profileImageUrlSmall: json["profileImageUrlSmall"],
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        roleName: json["roleName"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "profileImageUrlLarge": profileImageUrlLarge,
+        "profileImageUrlMedium": profileImageUrlMedium,
+        "profileImageUrlSmall": profileImageUrlSmall,
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "roleName": roleName,
+        "screenName": screenName,
+    };
+}
+
+class Query {
+    final List<OrderBy> orderBys;
+
+    Query({
+        required this.orderBys,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        orderBys: List<OrderBy>.from(json["orderBys"].map((x) => OrderBy.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "orderBys": List<dynamic>.from(orderBys.map((x) => x.toJson())),
+    };
+}
+
+class OrderBy {
+    final bool ascending;
+    final Expression expression;
+
+    OrderBy({
+        required this.ascending,
+        required this.expression,
+    });
+
+    factory OrderBy.fromJson(Map<String, dynamic> json) => OrderBy(
+        ascending: json["ascending"],
+        expression: Expression.fromJson(json["expression"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "expression": expression.toJson(),
+    };
+}
+
+class Expression {
+    final int columnId;
+    final String type;
+
+    Expression({
+        required this.columnId,
+        required this.type,
+    });
+
+    factory Expression.fromJson(Map<String, dynamic> json) => Expression(
+        columnId: json["columnId"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "columnId": columnId,
+        "type": type,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/617e8.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/617e8.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f37eea
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/617e8.json/default/TopLevel.dart
@@ -0,0 +1,769 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final String attribution;
+    final String attributionLink;
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String description;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final String locale;
+    final Metadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final List<String> tags;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.attribution,
+        required this.attributionLink,
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.description,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.tags,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        attribution: json["attribution"],
+        attributionLink: json["attributionLink"],
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        description: json["description"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        locale: json["locale"],
+        metadata: Metadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attribution": attribution,
+        "attributionLink": attributionLink,
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "description": description,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final TypeName dataTypeName;
+    final String? description;
+    final String fieldName;
+    final List<String>? flags;
+    final Format format;
+    final int id;
+    final String name;
+    final int position;
+    final TypeName renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        this.description,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: typeNameValues.map[json["dataTypeName"]]!,
+        description: json["description"],
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Format.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: typeNameValues.map[json["renderTypeName"]]!,
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": typeNameValues.reverse[dataTypeName],
+        "description": description,
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": typeNameValues.reverse[renderTypeName],
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final int cachedContentsNull;
+    final String largest;
+    final int nonNull;
+    final String smallest;
+    final List<Top> top;
+
+    CachedContents({
+        required this.cachedContentsNull,
+        required this.largest,
+        required this.nonNull,
+        required this.smallest,
+        required this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        top: List<Top>.from(json["top"].map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "top": List<dynamic>.from(top.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+enum TypeName {
+    META_DATA,
+    CALENDAR_DATE,
+    TEXT
+}
+
+final typeNameValues = EnumValues({
+    "meta_data": TypeName.META_DATA,
+    "calendar_date": TypeName.CALENDAR_DATE,
+    "text": TypeName.TEXT
+});
+
+class Format {
+    final String? align;
+    final String? view;
+
+    Format({
+        this.align,
+        this.view,
+    });
+
+    factory Format.fromJson(Map<String, dynamic> json) => Format(
+        align: json["align"],
+        view: json["view"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "align": align,
+        "view": view,
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class Metadata {
+    final List<Attachment> attachments;
+    final List<String> availableDisplayTypes;
+    final CustomFields customFields;
+    final JsonQuery jsonQuery;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+
+    Metadata({
+        required this.attachments,
+        required this.availableDisplayTypes,
+        required this.customFields,
+        required this.jsonQuery,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        attachments: List<Attachment>.from(json["attachments"].map((x) => Attachment.fromJson(x))),
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        customFields: CustomFields.fromJson(json["custom_fields"]),
+        jsonQuery: JsonQuery.fromJson(json["jsonQuery"]),
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachments": List<dynamic>.from(attachments.map((x) => x.toJson())),
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "custom_fields": customFields.toJson(),
+        "jsonQuery": jsonQuery.toJson(),
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+    };
+}
+
+class Attachment {
+    final String assetId;
+    final String blobId;
+    final String filename;
+    final String name;
+
+    Attachment({
+        required this.assetId,
+        required this.blobId,
+        required this.filename,
+        required this.name,
+    });
+
+    factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
+        assetId: json["assetId"],
+        blobId: json["blobId"],
+        filename: json["filename"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "assetId": assetId,
+        "blobId": blobId,
+        "filename": filename,
+        "name": name,
+    };
+}
+
+class CustomFields {
+    final AdditionalResources additionalResources;
+    final CommonCore commonCore;
+    final DatasetInformation datasetInformation;
+    final DatasetSummary datasetSummary;
+    final Notes notes;
+
+    CustomFields({
+        required this.additionalResources,
+        required this.commonCore,
+        required this.datasetInformation,
+        required this.datasetSummary,
+        required this.notes,
+    });
+
+    factory CustomFields.fromJson(Map<String, dynamic> json) => CustomFields(
+        additionalResources: AdditionalResources.fromJson(json["Additional Resources"]),
+        commonCore: CommonCore.fromJson(json["Common Core"]),
+        datasetInformation: DatasetInformation.fromJson(json["Dataset Information"]),
+        datasetSummary: DatasetSummary.fromJson(json["Dataset Summary"]),
+        notes: Notes.fromJson(json["Notes"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Additional Resources": additionalResources.toJson(),
+        "Common Core": commonCore.toJson(),
+        "Dataset Information": datasetInformation.toJson(),
+        "Dataset Summary": datasetSummary.toJson(),
+        "Notes": notes.toJson(),
+    };
+}
+
+class AdditionalResources {
+    final String seeAlso;
+
+    AdditionalResources({
+        required this.seeAlso,
+    });
+
+    factory AdditionalResources.fromJson(Map<String, dynamic> json) => AdditionalResources(
+        seeAlso: json["See Also"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "See Also": seeAlso,
+    };
+}
+
+class CommonCore {
+    final String contactEmail;
+    final String contactName;
+    final String publisher;
+
+    CommonCore({
+        required this.contactEmail,
+        required this.contactName,
+        required this.publisher,
+    });
+
+    factory CommonCore.fromJson(Map<String, dynamic> json) => CommonCore(
+        contactEmail: json["Contact Email"],
+        contactName: json["Contact Name"],
+        publisher: json["Publisher"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Email": contactEmail,
+        "Contact Name": contactName,
+        "Publisher": publisher,
+    };
+}
+
+class DatasetInformation {
+    final String agency;
+
+    DatasetInformation({
+        required this.agency,
+    });
+
+    factory DatasetInformation.fromJson(Map<String, dynamic> json) => DatasetInformation(
+        agency: json["Agency"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Agency": agency,
+    };
+}
+
+class DatasetSummary {
+    final String contactInformation;
+    final String coverage;
+    final String dataFrequency;
+    final String datasetOwner;
+    final String granularity;
+    final String organization;
+    final String postingFrequency;
+    final String timePeriod;
+
+    DatasetSummary({
+        required this.contactInformation,
+        required this.coverage,
+        required this.dataFrequency,
+        required this.datasetOwner,
+        required this.granularity,
+        required this.organization,
+        required this.postingFrequency,
+        required this.timePeriod,
+    });
+
+    factory DatasetSummary.fromJson(Map<String, dynamic> json) => DatasetSummary(
+        contactInformation: json["Contact Information"],
+        coverage: json["Coverage"],
+        dataFrequency: json["Data Frequency"],
+        datasetOwner: json["Dataset Owner"],
+        granularity: json["Granularity"],
+        organization: json["Organization"],
+        postingFrequency: json["Posting Frequency"],
+        timePeriod: json["Time Period"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Information": contactInformation,
+        "Coverage": coverage,
+        "Data Frequency": dataFrequency,
+        "Dataset Owner": datasetOwner,
+        "Granularity": granularity,
+        "Organization": organization,
+        "Posting Frequency": postingFrequency,
+        "Time Period": timePeriod,
+    };
+}
+
+class Notes {
+    final String notes;
+
+    Notes({
+        required this.notes,
+    });
+
+    factory Notes.fromJson(Map<String, dynamic> json) => Notes(
+        notes: json["Notes"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Notes": notes,
+    };
+}
+
+class JsonQuery {
+    final List<Order> order;
+
+    JsonQuery({
+        required this.order,
+    });
+
+    factory JsonQuery.fromJson(Map<String, dynamic> json) => JsonQuery(
+        order: List<Order>.from(json["order"].map((x) => Order.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "order": List<dynamic>.from(order.map((x) => x.toJson())),
+    };
+}
+
+class Order {
+    final bool ascending;
+    final String columnFieldName;
+
+    Order({
+        required this.ascending,
+        required this.columnFieldName,
+    });
+
+    factory Order.fromJson(Map<String, dynamic> json) => Order(
+        ascending: json["ascending"],
+        columnFieldName: json["columnFieldName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "columnFieldName": columnFieldName,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String profileImageUrlLarge;
+    final String profileImageUrlMedium;
+    final String profileImageUrlSmall;
+    final List<String> rights;
+    final String roleName;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.profileImageUrlLarge,
+        required this.profileImageUrlMedium,
+        required this.profileImageUrlSmall,
+        required this.rights,
+        required this.roleName,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        profileImageUrlLarge: json["profileImageUrlLarge"],
+        profileImageUrlMedium: json["profileImageUrlMedium"],
+        profileImageUrlSmall: json["profileImageUrlSmall"],
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        roleName: json["roleName"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "profileImageUrlLarge": profileImageUrlLarge,
+        "profileImageUrlMedium": profileImageUrlMedium,
+        "profileImageUrlSmall": profileImageUrlSmall,
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "roleName": roleName,
+        "screenName": screenName,
+    };
+}
+
+class Query {
+    final List<OrderBy> orderBys;
+
+    Query({
+        required this.orderBys,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        orderBys: List<OrderBy>.from(json["orderBys"].map((x) => OrderBy.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "orderBys": List<dynamic>.from(orderBys.map((x) => x.toJson())),
+    };
+}
+
+class OrderBy {
+    final bool ascending;
+    final Expression expression;
+
+    OrderBy({
+        required this.ascending,
+        required this.expression,
+    });
+
+    factory OrderBy.fromJson(Map<String, dynamic> json) => OrderBy(
+        ascending: json["ascending"],
+        expression: Expression.fromJson(json["expression"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "expression": expression.toJson(),
+    };
+}
+
+class Expression {
+    final int columnId;
+    final String type;
+
+    Expression({
+        required this.columnId,
+        required this.type,
+    });
+
+    factory Expression.fromJson(Map<String, dynamic> json) => Expression(
+        columnId: json["columnId"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "columnId": columnId,
+        "type": type,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/61b66.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/61b66.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/61b66.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart
new file mode 100644
index 0000000..4ad80e9
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart
@@ -0,0 +1,325 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<String> booster;
+    final String border;
+    final List<Card> cards;
+    final String code;
+    final String gathererCode;
+    final String magicCardsInfoCode;
+    final int mkmId;
+    final String mkmName;
+    final String name;
+    final DateTime releaseDate;
+    final String type;
+
+    TopLevel({
+        required this.booster,
+        required this.border,
+        required this.cards,
+        required this.code,
+        required this.gathererCode,
+        required this.magicCardsInfoCode,
+        required this.mkmId,
+        required this.mkmName,
+        required this.name,
+        required this.releaseDate,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        booster: List<String>.from(json["booster"].map((x) => x)),
+        border: json["border"],
+        cards: List<Card>.from(json["cards"].map((x) => Card.fromJson(x))),
+        code: json["code"],
+        gathererCode: json["gathererCode"],
+        magicCardsInfoCode: json["magicCardsInfoCode"],
+        mkmId: json["mkm_id"],
+        mkmName: json["mkm_name"],
+        name: json["name"],
+        releaseDate: DateTime.parse(json["releaseDate"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "booster": List<dynamic>.from(booster.map((x) => x)),
+        "border": border,
+        "cards": List<dynamic>.from(cards.map((x) => x.toJson())),
+        "code": code,
+        "gathererCode": gathererCode,
+        "magicCardsInfoCode": magicCardsInfoCode,
+        "mkm_id": mkmId,
+        "mkm_name": mkmName,
+        "name": name,
+        "releaseDate": "${releaseDate.year.toString().padLeft(4, '0')}-${releaseDate.month.toString().padLeft(2, '0')}-${releaseDate.day.toString().padLeft(2, '0')}",
+        "type": type,
+    };
+}
+
+class Card {
+    final String artist;
+    final int cmc;
+    final List<ColorIdentity>? colorIdentity;
+    final List<Watermark>? colors;
+    final String? flavor;
+    final String id;
+    final String imageName;
+    final Layout layout;
+    final List<LegalityElement> legalities;
+    final String? manaCost;
+    final String? mciNumber;
+    final int multiverseid;
+    final String name;
+    final String originalText;
+    final String originalType;
+    final String? power;
+    final List<String> printings;
+    final Rarity rarity;
+    final bool? reserved;
+    final List<Ruling>? rulings;
+    final List<String>? subtypes;
+    final List<String>? supertypes;
+    final String? text;
+    final String? toughness;
+    final String type;
+    final List<Type> types;
+    final List<int>? variations;
+    final Watermark? watermark;
+
+    Card({
+        required this.artist,
+        required this.cmc,
+        this.colorIdentity,
+        this.colors,
+        this.flavor,
+        required this.id,
+        required this.imageName,
+        required this.layout,
+        required this.legalities,
+        this.manaCost,
+        this.mciNumber,
+        required this.multiverseid,
+        required this.name,
+        required this.originalText,
+        required this.originalType,
+        this.power,
+        required this.printings,
+        required this.rarity,
+        this.reserved,
+        this.rulings,
+        this.subtypes,
+        this.supertypes,
+        this.text,
+        this.toughness,
+        required this.type,
+        required this.types,
+        this.variations,
+        this.watermark,
+    });
+
+    factory Card.fromJson(Map<String, dynamic> json) => Card(
+        artist: json["artist"],
+        cmc: json["cmc"],
+        colorIdentity: json["colorIdentity"] == null ? null : List<ColorIdentity>.from(json["colorIdentity"]!.map((x) => colorIdentityValues.map[x]!)),
+        colors: json["colors"] == null ? null : List<Watermark>.from(json["colors"]!.map((x) => watermarkValues.map[x]!)),
+        flavor: json["flavor"],
+        id: json["id"],
+        imageName: json["imageName"],
+        layout: layoutValues.map[json["layout"]]!,
+        legalities: List<LegalityElement>.from(json["legalities"].map((x) => LegalityElement.fromJson(x))),
+        manaCost: json["manaCost"],
+        mciNumber: json["mciNumber"],
+        multiverseid: json["multiverseid"],
+        name: json["name"],
+        originalText: json["originalText"],
+        originalType: json["originalType"],
+        power: json["power"],
+        printings: List<String>.from(json["printings"].map((x) => x)),
+        rarity: rarityValues.map[json["rarity"]]!,
+        reserved: json["reserved"],
+        rulings: json["rulings"] == null ? null : List<Ruling>.from(json["rulings"]!.map((x) => Ruling.fromJson(x))),
+        subtypes: json["subtypes"] == null ? null : List<String>.from(json["subtypes"]!.map((x) => x)),
+        supertypes: json["supertypes"] == null ? null : List<String>.from(json["supertypes"]!.map((x) => x)),
+        text: json["text"],
+        toughness: json["toughness"],
+        type: json["type"],
+        types: List<Type>.from(json["types"].map((x) => typeValues.map[x]!)),
+        variations: json["variations"] == null ? null : List<int>.from(json["variations"]!.map((x) => x)),
+        watermark: watermarkValues.map[json["watermark"]],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "artist": artist,
+        "cmc": cmc,
+        "colorIdentity": colorIdentity == null ? null : List<dynamic>.from(colorIdentity!.map((x) => colorIdentityValues.reverse[x])),
+        "colors": colors == null ? null : List<dynamic>.from(colors!.map((x) => watermarkValues.reverse[x])),
+        "flavor": flavor,
+        "id": id,
+        "imageName": imageName,
+        "layout": layoutValues.reverse[layout],
+        "legalities": List<dynamic>.from(legalities.map((x) => x.toJson())),
+        "manaCost": manaCost,
+        "mciNumber": mciNumber,
+        "multiverseid": multiverseid,
+        "name": name,
+        "originalText": originalText,
+        "originalType": originalType,
+        "power": power,
+        "printings": List<dynamic>.from(printings.map((x) => x)),
+        "rarity": rarityValues.reverse[rarity],
+        "reserved": reserved,
+        "rulings": rulings == null ? null : List<dynamic>.from(rulings!.map((x) => x.toJson())),
+        "subtypes": subtypes == null ? null : List<dynamic>.from(subtypes!.map((x) => x)),
+        "supertypes": supertypes == null ? null : List<dynamic>.from(supertypes!.map((x) => x)),
+        "text": text,
+        "toughness": toughness,
+        "type": type,
+        "types": List<dynamic>.from(types.map((x) => typeValues.reverse[x])),
+        "variations": variations == null ? null : List<dynamic>.from(variations!.map((x) => x)),
+        "watermark": watermarkValues.reverse[watermark],
+    };
+}
+
+enum ColorIdentity {
+    W,
+    R,
+    B,
+    G,
+    U
+}
+
+final colorIdentityValues = EnumValues({
+    "W": ColorIdentity.W,
+    "R": ColorIdentity.R,
+    "B": ColorIdentity.B,
+    "G": ColorIdentity.G,
+    "U": ColorIdentity.U
+});
+
+enum Watermark {
+    WHITE,
+    RED,
+    BLACK,
+    GREEN,
+    BLUE
+}
+
+final watermarkValues = EnumValues({
+    "White": Watermark.WHITE,
+    "Red": Watermark.RED,
+    "Black": Watermark.BLACK,
+    "Green": Watermark.GREEN,
+    "Blue": Watermark.BLUE
+});
+
+enum Layout {
+    NORMAL
+}
+
+final layoutValues = EnumValues({
+    "normal": Layout.NORMAL
+});
+
+class LegalityElement {
+    final String format;
+    final LegalityEnum legality;
+
+    LegalityElement({
+        required this.format,
+        required this.legality,
+    });
+
+    factory LegalityElement.fromJson(Map<String, dynamic> json) => LegalityElement(
+        format: json["format"],
+        legality: legalityEnumValues.map[json["legality"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "format": format,
+        "legality": legalityEnumValues.reverse[legality],
+    };
+}
+
+enum LegalityEnum {
+    LEGAL,
+    BANNED,
+    RESTRICTED
+}
+
+final legalityEnumValues = EnumValues({
+    "Legal": LegalityEnum.LEGAL,
+    "Banned": LegalityEnum.BANNED,
+    "Restricted": LegalityEnum.RESTRICTED
+});
+
+enum Rarity {
+    UNCOMMON,
+    RARE,
+    COMMON,
+    BASIC_LAND
+}
+
+final rarityValues = EnumValues({
+    "Uncommon": Rarity.UNCOMMON,
+    "Rare": Rarity.RARE,
+    "Common": Rarity.COMMON,
+    "Basic Land": Rarity.BASIC_LAND
+});
+
+class Ruling {
+    final DateTime date;
+    final String text;
+
+    Ruling({
+        required this.date,
+        required this.text,
+    });
+
+    factory Ruling.fromJson(Map<String, dynamic> json) => Ruling(
+        date: DateTime.parse(json["date"]),
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "text": text,
+    };
+}
+
+enum Type {
+    CREATURE,
+    ARTIFACT,
+    INSTANT,
+    LAND,
+    ENCHANTMENT,
+    SORCERY
+}
+
+final typeValues = EnumValues({
+    "Creature": Type.CREATURE,
+    "Artifact": Type.ARTIFACT,
+    "Instant": Type.INSTANT,
+    "Land": Type.LAND,
+    "Enchantment": Type.ENCHANTMENT,
+    "Sorcery": Type.SORCERY
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/66121.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/66121.json/default/TopLevel.dart
new file mode 100644
index 0000000..060fd6c
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/66121.json/default/TopLevel.dart
@@ -0,0 +1,177 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final String? supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    SPDX,
+    TROVE,
+    DEP5
+}
+
+final schemeValues = EnumValues({
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE,
+    "DEP5": Scheme.DEP5
+});
+
+enum Keyword {
+    OSI_APPROVED,
+    DISCOURAGED,
+    REDUNDANT
+}
+
+final keywordValues = EnumValues({
+    "osi-approved": Keyword.OSI_APPROVED,
+    "discouraged": Keyword.DISCOURAGED,
+    "redundant": Keyword.REDUNDANT
+});
+
+class Link {
+    final Note note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: noteValues.map[json["note"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": noteValues.reverse[note],
+        "url": url,
+    };
+}
+
+enum Note {
+    OSI_PAGE
+}
+
+final noteValues = EnumValues({
+    "OSI Page": Note.OSI_PAGE
+});
+
+class Text {
+    final MediaType mediaType;
+    final Title title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: mediaTypeValues.map[json["media_type"]]!,
+        title: titleValues.map[json["title"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaTypeValues.reverse[mediaType],
+        "title": titleValues.reverse[title],
+        "url": url,
+    };
+}
+
+enum MediaType {
+    TEXT_HTML
+}
+
+final mediaTypeValues = EnumValues({
+    "text/html": MediaType.TEXT_HTML
+});
+
+enum Title {
+    HTML
+}
+
+final titleValues = EnumValues({
+    "HTML": Title.HTML
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/6617c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6617c.json/default/TopLevel.dart
new file mode 100644
index 0000000..1a3400a
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/6617c.json/default/TopLevel.dart
@@ -0,0 +1,53 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final IssPosition issPosition;
+    final String message;
+    final int timestamp;
+
+    TopLevel({
+        required this.issPosition,
+        required this.message,
+        required this.timestamp,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        issPosition: IssPosition.fromJson(json["iss_position"]),
+        message: json["message"],
+        timestamp: json["timestamp"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "iss_position": issPosition.toJson(),
+        "message": message,
+        "timestamp": timestamp,
+    };
+}
+
+class IssPosition {
+    final String latitude;
+    final String longitude;
+
+    IssPosition({
+        required this.latitude,
+        required this.longitude,
+    });
+
+    factory IssPosition.fromJson(Map<String, dynamic> json) => IssPosition(
+        latitude: json["latitude"],
+        longitude: json["longitude"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "latitude": latitude,
+        "longitude": longitude,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/67c03.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/67c03.json/default/TopLevel.dart
new file mode 100644
index 0000000..1e02d54
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/67c03.json/default/TopLevel.dart
@@ -0,0 +1,53 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String message;
+    final int number;
+    final List<Person> people;
+
+    TopLevel({
+        required this.message,
+        required this.number,
+        required this.people,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        message: json["message"],
+        number: json["number"],
+        people: List<Person>.from(json["people"].map((x) => Person.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "message": message,
+        "number": number,
+        "people": List<dynamic>.from(people.map((x) => x.toJson())),
+    };
+}
+
+class Person {
+    final String craft;
+    final String name;
+
+    Person({
+        required this.craft,
+        required this.name,
+    });
+
+    factory Person.fromJson(Map<String, dynamic> json) => Person(
+        craft: json["craft"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "craft": craft,
+        "name": name,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/68c30.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/68c30.json/default/TopLevel.dart
new file mode 100644
index 0000000..f7dfbfd
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/68c30.json/default/TopLevel.dart
@@ -0,0 +1,149 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Tx> txs;
+
+    TopLevel({
+        required this.txs,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        txs: List<Tx>.from(json["txs"].map((x) => Tx.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "txs": List<dynamic>.from(txs.map((x) => x.toJson())),
+    };
+}
+
+class Tx {
+    final bool doubleSpend;
+    final String hash;
+    final List<Input> inputs;
+    final int lockTime;
+    final List<Out> out;
+    final String relayedBy;
+    final int size;
+    final int time;
+    final int txIndex;
+    final int ver;
+    final int vinSz;
+    final int voutSz;
+
+    Tx({
+        required this.doubleSpend,
+        required this.hash,
+        required this.inputs,
+        required this.lockTime,
+        required this.out,
+        required this.relayedBy,
+        required this.size,
+        required this.time,
+        required this.txIndex,
+        required this.ver,
+        required this.vinSz,
+        required this.voutSz,
+    });
+
+    factory Tx.fromJson(Map<String, dynamic> json) => Tx(
+        doubleSpend: json["double_spend"],
+        hash: json["hash"],
+        inputs: List<Input>.from(json["inputs"].map((x) => Input.fromJson(x))),
+        lockTime: json["lock_time"],
+        out: List<Out>.from(json["out"].map((x) => Out.fromJson(x))),
+        relayedBy: json["relayed_by"],
+        size: json["size"],
+        time: json["time"],
+        txIndex: json["tx_index"],
+        ver: json["ver"],
+        vinSz: json["vin_sz"],
+        voutSz: json["vout_sz"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "double_spend": doubleSpend,
+        "hash": hash,
+        "inputs": List<dynamic>.from(inputs.map((x) => x.toJson())),
+        "lock_time": lockTime,
+        "out": List<dynamic>.from(out.map((x) => x.toJson())),
+        "relayed_by": relayedBy,
+        "size": size,
+        "time": time,
+        "tx_index": txIndex,
+        "ver": ver,
+        "vin_sz": vinSz,
+        "vout_sz": voutSz,
+    };
+}
+
+class Input {
+    final Out prevOut;
+    final String script;
+    final int sequence;
+
+    Input({
+        required this.prevOut,
+        required this.script,
+        required this.sequence,
+    });
+
+    factory Input.fromJson(Map<String, dynamic> json) => Input(
+        prevOut: Out.fromJson(json["prev_out"]),
+        script: json["script"],
+        sequence: json["sequence"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "prev_out": prevOut.toJson(),
+        "script": script,
+        "sequence": sequence,
+    };
+}
+
+class Out {
+    final String addr;
+    final int n;
+    final String script;
+    final bool spent;
+    final int txIndex;
+    final int type;
+    final int value;
+
+    Out({
+        required this.addr,
+        required this.n,
+        required this.script,
+        required this.spent,
+        required this.txIndex,
+        required this.type,
+        required this.value,
+    });
+
+    factory Out.fromJson(Map<String, dynamic> json) => Out(
+        addr: json["addr"],
+        n: json["n"],
+        script: json["script"],
+        spent: json["spent"],
+        txIndex: json["tx_index"],
+        type: json["type"],
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "addr": addr,
+        "n": n,
+        "script": script,
+        "spent": spent,
+        "tx_index": txIndex,
+        "type": type,
+        "value": value,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/6c155.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6c155.json/default/TopLevel.dart
new file mode 100644
index 0000000..1f721a5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/6c155.json/default/TopLevel.dart
@@ -0,0 +1,237 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Metadata metadata;
+    final List<Result> results;
+
+    TopLevel({
+        required this.metadata,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        metadata: Metadata.fromJson(json["metadata"]),
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "metadata": metadata.toJson(),
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Metadata {
+    final double executionTime;
+    final ResponseInfo responseInfo;
+    final Resultset resultset;
+
+    Metadata({
+        required this.executionTime,
+        required this.responseInfo,
+        required this.resultset,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        executionTime: json["executionTime"]?.toDouble(),
+        responseInfo: ResponseInfo.fromJson(json["responseInfo"]),
+        resultset: Resultset.fromJson(json["resultset"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "executionTime": executionTime,
+        "responseInfo": responseInfo.toJson(),
+        "resultset": resultset.toJson(),
+    };
+}
+
+class ResponseInfo {
+    final String developerMessage;
+    final int status;
+
+    ResponseInfo({
+        required this.developerMessage,
+        required this.status,
+    });
+
+    factory ResponseInfo.fromJson(Map<String, dynamic> json) => ResponseInfo(
+        developerMessage: json["developerMessage"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "developerMessage": developerMessage,
+        "status": status,
+    };
+}
+
+class Resultset {
+    final int count;
+    final int page;
+    final int pagesize;
+
+    Resultset({
+        required this.count,
+        required this.page,
+        required this.pagesize,
+    });
+
+    factory Resultset.fromJson(Map<String, dynamic> json) => Resultset(
+        count: json["count"],
+        page: json["page"],
+        pagesize: json["pagesize"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "page": page,
+        "pagesize": pagesize,
+    };
+}
+
+class Result {
+    final List<dynamic> attachment;
+    final String body;
+    final String changed;
+    final List<Component> component;
+    final String created;
+    final String date;
+    final List<dynamic> image;
+    final Location location;
+    final dynamic teaser;
+    final String title;
+    final List<dynamic> topic;
+    final String url;
+    final String uuid;
+    final String vuuid;
+
+    Result({
+        required this.attachment,
+        required this.body,
+        required this.changed,
+        required this.component,
+        required this.created,
+        required this.date,
+        required this.image,
+        required this.location,
+        required this.teaser,
+        required this.title,
+        required this.topic,
+        required this.url,
+        required this.uuid,
+        required this.vuuid,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        attachment: List<dynamic>.from(json["attachment"].map((x) => x)),
+        body: json["body"],
+        changed: json["changed"],
+        component: List<Component>.from(json["component"].map((x) => Component.fromJson(x))),
+        created: json["created"],
+        date: json["date"],
+        image: List<dynamic>.from(json["image"].map((x) => x)),
+        location: Location.fromJson(json["location"]),
+        teaser: json["teaser"],
+        title: json["title"],
+        topic: List<dynamic>.from(json["topic"].map((x) => x)),
+        url: json["url"],
+        uuid: json["uuid"],
+        vuuid: json["vuuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachment": List<dynamic>.from(attachment.map((x) => x)),
+        "body": body,
+        "changed": changed,
+        "component": List<dynamic>.from(component.map((x) => x.toJson())),
+        "created": created,
+        "date": date,
+        "image": List<dynamic>.from(image.map((x) => x)),
+        "location": location.toJson(),
+        "teaser": teaser,
+        "title": title,
+        "topic": List<dynamic>.from(topic.map((x) => x)),
+        "url": url,
+        "uuid": uuid,
+        "vuuid": vuuid,
+    };
+}
+
+class Component {
+    final String name;
+    final String uuid;
+
+    Component({
+        required this.name,
+        required this.uuid,
+    });
+
+    factory Component.fromJson(Map<String, dynamic> json) => Component(
+        name: json["name"],
+        uuid: json["uuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "uuid": uuid,
+    };
+}
+
+class Location {
+    final String administrativeArea;
+    final String country;
+    final String faxNumber;
+    final String locality;
+    final String mobileNumber;
+    final String phoneNumber;
+    final String phoneNumberExtension;
+    final String postalCode;
+    final dynamic subPremise;
+    final String thoroughfare;
+
+    Location({
+        required this.administrativeArea,
+        required this.country,
+        required this.faxNumber,
+        required this.locality,
+        required this.mobileNumber,
+        required this.phoneNumber,
+        required this.phoneNumberExtension,
+        required this.postalCode,
+        required this.subPremise,
+        required this.thoroughfare,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        administrativeArea: json["administrative_area"],
+        country: json["country"],
+        faxNumber: json["fax_number"],
+        locality: json["locality"],
+        mobileNumber: json["mobile_number"],
+        phoneNumber: json["phone_number"],
+        phoneNumberExtension: json["phone_number_extension"],
+        postalCode: json["postal_code"],
+        subPremise: json["sub_premise"],
+        thoroughfare: json["thoroughfare"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "administrative_area": administrativeArea,
+        "country": country,
+        "fax_number": faxNumber,
+        "locality": locality,
+        "mobile_number": mobileNumber,
+        "phone_number": phoneNumber,
+        "phone_number_extension": phoneNumberExtension,
+        "postal_code": postalCode,
+        "sub_premise": subPremise,
+        "thoroughfare": thoroughfare,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/6de06.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6de06.json/default/TopLevel.dart
new file mode 100644
index 0000000..699d7fc
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/6de06.json/default/TopLevel.dart
@@ -0,0 +1,613 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final String? authorFlairCssClass;
+    final String? authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final dynamic distinguished;
+    final String domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final String? linkFlairCssClass;
+    final String? linkFlairText;
+    final bool locked;
+    final Media? media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final PostHint? postHint;
+    final Preview? preview;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final Media? secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final String? selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final String subreddit;
+    final String subredditId;
+    final String subredditNamePrefixed;
+    final SubredditType subredditType;
+    final String? suggestedSort;
+    final String thumbnail;
+    final int? thumbnailHeight;
+    final int? thumbnailWidth;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        this.postHint,
+        this.preview,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.thumbnailHeight,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: json["domain"],
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"] == null ? null : Media.fromJson(json["media"]),
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        postHint: postHintValues.map[json["post_hint"]],
+        preview: json["preview"] == null ? null : Preview.fromJson(json["preview"]),
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"] == null ? null : Media.fromJson(json["secure_media"]),
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: json["subreddit"],
+        subredditId: json["subreddit_id"],
+        subredditNamePrefixed: json["subreddit_name_prefixed"],
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domain,
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media?.toJson(),
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "post_hint": postHintValues.reverse[postHint],
+        "preview": preview?.toJson(),
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia?.toJson(),
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subreddit,
+        "subreddit_id": subredditId,
+        "subreddit_name_prefixed": subredditNamePrefixed,
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+class Media {
+    final Oembed oembed;
+    final String type;
+
+    Media({
+        required this.oembed,
+        required this.type,
+    });
+
+    factory Media.fromJson(Map<String, dynamic> json) => Media(
+        oembed: Oembed.fromJson(json["oembed"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "oembed": oembed.toJson(),
+        "type": type,
+    };
+}
+
+class Oembed {
+    final String description;
+    final int height;
+    final String html;
+    final String providerName;
+    final String providerUrl;
+    final int thumbnailHeight;
+    final String thumbnailUrl;
+    final int thumbnailWidth;
+    final String title;
+    final String type;
+    final String version;
+    final int width;
+
+    Oembed({
+        required this.description,
+        required this.height,
+        required this.html,
+        required this.providerName,
+        required this.providerUrl,
+        required this.thumbnailHeight,
+        required this.thumbnailUrl,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.type,
+        required this.version,
+        required this.width,
+    });
+
+    factory Oembed.fromJson(Map<String, dynamic> json) => Oembed(
+        description: json["description"],
+        height: json["height"],
+        html: json["html"],
+        providerName: json["provider_name"],
+        providerUrl: json["provider_url"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailUrl: json["thumbnail_url"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        type: json["type"],
+        version: json["version"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "height": height,
+        "html": html,
+        "provider_name": providerName,
+        "provider_url": providerUrl,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_url": thumbnailUrl,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "type": type,
+        "version": version,
+        "width": width,
+    };
+}
+
+class MediaEmbed {
+    final String? content;
+    final int? height;
+    final bool? scrolling;
+    final int? width;
+
+    MediaEmbed({
+        this.content,
+        this.height,
+        this.scrolling,
+        this.width,
+    });
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+        content: json["content"],
+        height: json["height"],
+        scrolling: json["scrolling"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "content": content,
+        "height": height,
+        "scrolling": scrolling,
+        "width": width,
+    };
+}
+
+enum PostHint {
+    LINK,
+    IMAGE,
+    RICH_VIDEO
+}
+
+final postHintValues = EnumValues({
+    "link": PostHint.LINK,
+    "image": PostHint.IMAGE,
+    "rich:video": PostHint.RICH_VIDEO
+});
+
+class Preview {
+    final bool enabled;
+    final List<Image> images;
+
+    Preview({
+        required this.enabled,
+        required this.images,
+    });
+
+    factory Preview.fromJson(Map<String, dynamic> json) => Preview(
+        enabled: json["enabled"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "enabled": enabled,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+    };
+}
+
+class Image {
+    final String id;
+    final List<Source> resolutions;
+    final Source source;
+    final Variants variants;
+
+    Image({
+        required this.id,
+        required this.resolutions,
+        required this.source,
+        required this.variants,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        id: json["id"],
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+        variants: Variants.fromJson(json["variants"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+        "variants": variants.toJson(),
+    };
+}
+
+class Source {
+    final int height;
+    final String url;
+    final int width;
+
+    Source({
+        required this.height,
+        required this.url,
+        required this.width,
+    });
+
+    factory Source.fromJson(Map<String, dynamic> json) => Source(
+        height: json["height"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Variants {
+    final Gif? gif;
+    final Gif? mp4;
+    final Gif? nsfw;
+    final Gif? obfuscated;
+
+    Variants({
+        this.gif,
+        this.mp4,
+        this.nsfw,
+        this.obfuscated,
+    });
+
+    factory Variants.fromJson(Map<String, dynamic> json) => Variants(
+        gif: json["gif"] == null ? null : Gif.fromJson(json["gif"]),
+        mp4: json["mp4"] == null ? null : Gif.fromJson(json["mp4"]),
+        nsfw: json["nsfw"] == null ? null : Gif.fromJson(json["nsfw"]),
+        obfuscated: json["obfuscated"] == null ? null : Gif.fromJson(json["obfuscated"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "gif": gif?.toJson(),
+        "mp4": mp4?.toJson(),
+        "nsfw": nsfw?.toJson(),
+        "obfuscated": obfuscated?.toJson(),
+    };
+}
+
+class Gif {
+    final List<Source> resolutions;
+    final Source source;
+
+    Gif({
+        required this.resolutions,
+        required this.source,
+    });
+
+    factory Gif.fromJson(Map<String, dynamic> json) => Gif(
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+    };
+}
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart
new file mode 100644
index 0000000..81c258e
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart
@@ -0,0 +1,441 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final Text text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": textValues.reverse[text],
+    };
+}
+
+enum Text {
+    SHOWERS,
+    MOSTLY_SUNNY,
+    PARTLY_CLOUDY
+}
+
+final textValues = EnumValues({
+    "Showers": Text.SHOWERS,
+    "Mostly Sunny": Text.MOSTLY_SUNNY,
+    "Partly Cloudy": Text.PARTLY_CLOUDY
+});
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/6eb00.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6eb00.json/default/TopLevel.dart
new file mode 100644
index 0000000..108ac0d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/6eb00.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int directorateId;
+    final int id;
+    final String name;
+
+    TopLevel({
+        required this.directorateId,
+        required this.id,
+        required this.name,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        directorateId: json["DirectorateID"],
+        id: json["Id"],
+        name: json["Name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "DirectorateID": directorateId,
+        "Id": id,
+        "Name": name,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart
new file mode 100644
index 0000000..e4106c8
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart
@@ -0,0 +1,325 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final String next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final String? acronym;
+    final String activityConsultCommittees;
+    final String activityEuLegislative;
+    final String activityExpertGroups;
+    final String activityHighLevelGroups;
+    final String activityIndustryForums;
+    final String activityInterGroups;
+    final String? activityOther;
+    final String activityRelevantComm;
+    final String? beOfficeCountry;
+    final double? beOfficeLat;
+    final double? beOfficeLon;
+    final String? beOfficePhone;
+    final String? beOfficePostCode;
+    final String? beOfficePostbox;
+    final String? beOfficeStreet;
+    final String? beOfficeTown;
+    final String codeOfConduct;
+    final int contactCountry;
+    final DateTime createdAt;
+    final String entity;
+    final String goals;
+    final String head;
+    final String headOfficeCountry;
+    final double? headOfficeLat;
+    final double? headOfficeLon;
+    final String headOfficePhone;
+    final String? headOfficePostCode;
+    final String? headOfficePostbox;
+    final String headOfficeStreet;
+    final String headOfficeTown;
+    final String id;
+    final String identificationCode;
+    final String infoMembers;
+    final DateTime lastUpdateDate;
+    final String legal;
+    final String legalStatus;
+    final int mainCategory;
+    final String mainCategoryTitle;
+    final int members;
+    final int? members100;
+    final int? members25;
+    final int? members50;
+    final int? members75;
+    final double membersFte;
+    final String name;
+    final dynamic nativeName;
+    final String? networking;
+    final int? numberOfNaturalPersons;
+    final String? otherCodeOfConduct;
+    final DateTime registrationDate;
+    final Status status;
+    final String structureMembers;
+    final int subCategory;
+    final String subCategoryTitle;
+    final DateTime updatedAt;
+    final String uri;
+    final String? webSiteUrl;
+
+    Result({
+        required this.acronym,
+        required this.activityConsultCommittees,
+        required this.activityEuLegislative,
+        required this.activityExpertGroups,
+        required this.activityHighLevelGroups,
+        required this.activityIndustryForums,
+        required this.activityInterGroups,
+        required this.activityOther,
+        required this.activityRelevantComm,
+        this.beOfficeCountry,
+        this.beOfficeLat,
+        this.beOfficeLon,
+        this.beOfficePhone,
+        this.beOfficePostCode,
+        this.beOfficePostbox,
+        this.beOfficeStreet,
+        this.beOfficeTown,
+        required this.codeOfConduct,
+        required this.contactCountry,
+        required this.createdAt,
+        required this.entity,
+        required this.goals,
+        required this.head,
+        required this.headOfficeCountry,
+        required this.headOfficeLat,
+        required this.headOfficeLon,
+        required this.headOfficePhone,
+        required this.headOfficePostCode,
+        required this.headOfficePostbox,
+        required this.headOfficeStreet,
+        required this.headOfficeTown,
+        required this.id,
+        required this.identificationCode,
+        required this.infoMembers,
+        required this.lastUpdateDate,
+        required this.legal,
+        required this.legalStatus,
+        required this.mainCategory,
+        required this.mainCategoryTitle,
+        required this.members,
+        required this.members100,
+        required this.members25,
+        required this.members50,
+        required this.members75,
+        required this.membersFte,
+        required this.name,
+        required this.nativeName,
+        required this.networking,
+        required this.numberOfNaturalPersons,
+        required this.otherCodeOfConduct,
+        required this.registrationDate,
+        required this.status,
+        required this.structureMembers,
+        required this.subCategory,
+        required this.subCategoryTitle,
+        required this.updatedAt,
+        required this.uri,
+        required this.webSiteUrl,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        acronym: json["acronym"],
+        activityConsultCommittees: json["activity_consult_committees"],
+        activityEuLegislative: json["activity_eu_legislative"],
+        activityExpertGroups: json["activity_expert_groups"],
+        activityHighLevelGroups: json["activity_high_level_groups"],
+        activityIndustryForums: json["activity_industry_forums"],
+        activityInterGroups: json["activity_inter_groups"],
+        activityOther: json["activity_other"],
+        activityRelevantComm: json["activity_relevant_comm"],
+        beOfficeCountry: json["be_office_country"],
+        beOfficeLat: json["be_office_lat"]?.toDouble(),
+        beOfficeLon: json["be_office_lon"]?.toDouble(),
+        beOfficePhone: json["be_office_phone"],
+        beOfficePostCode: json["be_office_post_code"],
+        beOfficePostbox: json["be_office_postbox"],
+        beOfficeStreet: json["be_office_street"],
+        beOfficeTown: json["be_office_town"],
+        codeOfConduct: json["code_of_conduct"],
+        contactCountry: json["contact_country"],
+        createdAt: DateTime.parse(json["created_at"]),
+        entity: json["entity"],
+        goals: json["goals"],
+        head: json["head"],
+        headOfficeCountry: json["head_office_country"],
+        headOfficeLat: json["head_office_lat"]?.toDouble(),
+        headOfficeLon: json["head_office_lon"]?.toDouble(),
+        headOfficePhone: json["head_office_phone"],
+        headOfficePostCode: json["head_office_post_code"],
+        headOfficePostbox: json["head_office_postbox"],
+        headOfficeStreet: json["head_office_street"],
+        headOfficeTown: json["head_office_town"],
+        id: json["id"],
+        identificationCode: json["identification_code"],
+        infoMembers: json["info_members"],
+        lastUpdateDate: DateTime.parse(json["last_update_date"]),
+        legal: json["legal"],
+        legalStatus: json["legal_status"],
+        mainCategory: json["main_category"],
+        mainCategoryTitle: json["main_category_title"],
+        members: json["members"],
+        members100: json["members_100"],
+        members25: json["members_25"],
+        members50: json["members_50"],
+        members75: json["members_75"],
+        membersFte: json["members_fte"]?.toDouble(),
+        name: json["name"],
+        nativeName: json["native_name"],
+        networking: json["networking"],
+        numberOfNaturalPersons: json["number_of_natural_persons"],
+        otherCodeOfConduct: json["other_code_of_conduct"],
+        registrationDate: DateTime.parse(json["registration_date"]),
+        status: statusValues.map[json["status"]]!,
+        structureMembers: json["structure_members"],
+        subCategory: json["sub_category"],
+        subCategoryTitle: json["sub_category_title"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+        webSiteUrl: json["web_site_url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "acronym": acronym,
+        "activity_consult_committees": activityConsultCommittees,
+        "activity_eu_legislative": activityEuLegislative,
+        "activity_expert_groups": activityExpertGroups,
+        "activity_high_level_groups": activityHighLevelGroups,
+        "activity_industry_forums": activityIndustryForums,
+        "activity_inter_groups": activityInterGroups,
+        "activity_other": activityOther,
+        "activity_relevant_comm": activityRelevantComm,
+        "be_office_country": beOfficeCountry,
+        "be_office_lat": beOfficeLat,
+        "be_office_lon": beOfficeLon,
+        "be_office_phone": beOfficePhone,
+        "be_office_post_code": beOfficePostCode,
+        "be_office_postbox": beOfficePostbox,
+        "be_office_street": beOfficeStreet,
+        "be_office_town": beOfficeTown,
+        "code_of_conduct": codeOfConduct,
+        "contact_country": contactCountry,
+        "created_at": createdAt.toIso8601String(),
+        "entity": entity,
+        "goals": goals,
+        "head": head,
+        "head_office_country": headOfficeCountry,
+        "head_office_lat": headOfficeLat,
+        "head_office_lon": headOfficeLon,
+        "head_office_phone": headOfficePhone,
+        "head_office_post_code": headOfficePostCode,
+        "head_office_postbox": headOfficePostbox,
+        "head_office_street": headOfficeStreet,
+        "head_office_town": headOfficeTown,
+        "id": id,
+        "identification_code": identificationCode,
+        "info_members": infoMembers,
+        "last_update_date": lastUpdateDate.toIso8601String(),
+        "legal": legal,
+        "legal_status": legalStatus,
+        "main_category": mainCategory,
+        "main_category_title": mainCategoryTitle,
+        "members": members,
+        "members_100": members100,
+        "members_25": members25,
+        "members_50": members50,
+        "members_75": members75,
+        "members_fte": membersFte,
+        "name": name,
+        "native_name": nativeName,
+        "networking": networking,
+        "number_of_natural_persons": numberOfNaturalPersons,
+        "other_code_of_conduct": otherCodeOfConduct,
+        "registration_date": registrationDate.toIso8601String(),
+        "status": statusValues.reverse[status],
+        "structure_members": structureMembers,
+        "sub_category": subCategory,
+        "sub_category_title": subCategoryTitle,
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+        "web_site_url": webSiteUrl,
+    };
+}
+
+enum Status {
+    ACTIVE,
+    INACTIVE
+}
+
+final statusValues = EnumValues({
+    "active": Status.ACTIVE,
+    "inactive": Status.INACTIVE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/7681c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7681c.json/default/TopLevel.dart
new file mode 100644
index 0000000..18f620e
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7681c.json/default/TopLevel.dart
@@ -0,0 +1,479 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final Username username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": usernameValues.reverse[username],
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+    final Downsized? the480WStill;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+        this.the480WStill,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+        the480WStill: json["480w_still"] == null ? null : Downsized.fromJson(json["480w_still"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+        "480w_still": the480WStill?.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    G,
+    PG,
+    PG_13
+}
+
+final ratingValues = EnumValues({
+    "g": Rating.G,
+    "pg": Rating.PG,
+    "pg-13": Rating.PG_13
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String? twitter;
+    final String username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": username,
+    };
+}
+
+enum Username {
+    EMPTY,
+    MASHABLE,
+    NBA,
+    ORIGINALS
+}
+
+final usernameValues = EnumValues({
+    "": Username.EMPTY,
+    "mashable": Username.MASHABLE,
+    "nba": Username.NBA,
+    "Originals": Username.ORIGINALS
+});
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/76ae1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/76ae1.json/default/TopLevel.dart
new file mode 100644
index 0000000..c205b60
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/76ae1.json/default/TopLevel.dart
@@ -0,0 +1,761 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String basePath;
+    final Definitions definitions;
+    final String host;
+    final Info info;
+    final Paths paths;
+    final List<String> produces;
+    final List<String> schemes;
+    final String swagger;
+
+    TopLevel({
+        required this.basePath,
+        required this.definitions,
+        required this.host,
+        required this.info,
+        required this.paths,
+        required this.produces,
+        required this.schemes,
+        required this.swagger,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        basePath: json["basePath"],
+        definitions: Definitions.fromJson(json["definitions"]),
+        host: json["host"],
+        info: Info.fromJson(json["info"]),
+        paths: Paths.fromJson(json["paths"]),
+        produces: List<String>.from(json["produces"].map((x) => x)),
+        schemes: List<String>.from(json["schemes"].map((x) => x)),
+        swagger: json["swagger"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "basePath": basePath,
+        "definitions": definitions.toJson(),
+        "host": host,
+        "info": info.toJson(),
+        "paths": paths.toJson(),
+        "produces": List<dynamic>.from(produces.map((x) => x)),
+        "schemes": List<dynamic>.from(schemes.map((x) => x)),
+        "swagger": swagger,
+    };
+}
+
+class Definitions {
+    final Article article;
+    final Article center;
+    final DeMinimis deMinimis;
+    final Article event;
+    final Faq faq;
+    final Article lead;
+    final Article list;
+    final Article marketIntelligence;
+    final Article office;
+    final Article provider;
+    final Article rate;
+    final Report report;
+    final Taxonomy taxonomy;
+
+    Definitions({
+        required this.article,
+        required this.center,
+        required this.deMinimis,
+        required this.event,
+        required this.faq,
+        required this.lead,
+        required this.list,
+        required this.marketIntelligence,
+        required this.office,
+        required this.provider,
+        required this.rate,
+        required this.report,
+        required this.taxonomy,
+    });
+
+    factory Definitions.fromJson(Map<String, dynamic> json) => Definitions(
+        article: Article.fromJson(json["Article"]),
+        center: Article.fromJson(json["Center"]),
+        deMinimis: DeMinimis.fromJson(json["DeMinimis"]),
+        event: Article.fromJson(json["Event"]),
+        faq: Faq.fromJson(json["FAQ"]),
+        lead: Article.fromJson(json["Lead"]),
+        list: Article.fromJson(json["List"]),
+        marketIntelligence: Article.fromJson(json["MarketIntelligence"]),
+        office: Article.fromJson(json["Office"]),
+        provider: Article.fromJson(json["Provider"]),
+        rate: Article.fromJson(json["Rate"]),
+        report: Report.fromJson(json["Report"]),
+        taxonomy: Taxonomy.fromJson(json["Taxonomy"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Article": article.toJson(),
+        "Center": center.toJson(),
+        "DeMinimis": deMinimis.toJson(),
+        "Event": event.toJson(),
+        "FAQ": faq.toJson(),
+        "Lead": lead.toJson(),
+        "List": list.toJson(),
+        "MarketIntelligence": marketIntelligence.toJson(),
+        "Office": office.toJson(),
+        "Provider": provider.toJson(),
+        "Rate": rate.toJson(),
+        "Report": report.toJson(),
+        "Taxonomy": taxonomy.toJson(),
+    };
+}
+
+class Article {
+    final Map<String, Property> properties;
+
+    Article({
+        required this.properties,
+    });
+
+    factory Article.fromJson(Map<String, dynamic> json) => Article(
+        properties: Map.from(json["properties"]).map((k, v) => MapEntry<String, Property>(k, Property.fromJson(v))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": Map.from(properties).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+    };
+}
+
+class Property {
+    final String description;
+    final FormatEnum type;
+
+    Property({
+        required this.description,
+        required this.type,
+    });
+
+    factory Property.fromJson(Map<String, dynamic> json) => Property(
+        description: json["description"],
+        type: formatEnumValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "type": formatEnumValues.reverse[type],
+    };
+}
+
+enum FormatEnum {
+    STRING
+}
+
+final formatEnumValues = EnumValues({
+    "string": FormatEnum.STRING
+});
+
+class DeMinimis {
+    final DeMinimisProperties properties;
+
+    DeMinimis({
+        required this.properties,
+    });
+
+    factory DeMinimis.fromJson(Map<String, dynamic> json) => DeMinimis(
+        properties: DeMinimisProperties.fromJson(json["properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+    };
+}
+
+class DeMinimisProperties {
+    final Property countries;
+    final Property country;
+    final Property deMinimisCurrency;
+    final Property deMinimisValue;
+    final Property notes;
+    final Property vatAmount;
+    final Property vatCurrency;
+
+    DeMinimisProperties({
+        required this.countries,
+        required this.country,
+        required this.deMinimisCurrency,
+        required this.deMinimisValue,
+        required this.notes,
+        required this.vatAmount,
+        required this.vatCurrency,
+    });
+
+    factory DeMinimisProperties.fromJson(Map<String, dynamic> json) => DeMinimisProperties(
+        countries: Property.fromJson(json["countries"]),
+        country: Property.fromJson(json["country"]),
+        deMinimisCurrency: Property.fromJson(json["de_minimis_currency"]),
+        deMinimisValue: Property.fromJson(json["de_minimis_value"]),
+        notes: Property.fromJson(json["notes"]),
+        vatAmount: Property.fromJson(json["vat_amount"]),
+        vatCurrency: Property.fromJson(json["vat_currency"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "countries": countries.toJson(),
+        "country": country.toJson(),
+        "de_minimis_currency": deMinimisCurrency.toJson(),
+        "de_minimis_value": deMinimisValue.toJson(),
+        "notes": notes.toJson(),
+        "vat_amount": vatAmount.toJson(),
+        "vat_currency": vatCurrency.toJson(),
+    };
+}
+
+class Faq {
+    final FaqProperties properties;
+
+    Faq({
+        required this.properties,
+    });
+
+    factory Faq.fromJson(Map<String, dynamic> json) => Faq(
+        properties: FaqProperties.fromJson(json["properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+    };
+}
+
+class FaqProperties {
+    final Property answer;
+    final Property countries;
+    final Property firstPublishedDate;
+    final Property id;
+    final Property industries;
+    final Property lastPublishedDate;
+    final Property question;
+    final Property topics;
+    final Property tradeRegions;
+    final Property url;
+    final Property worldRegions;
+
+    FaqProperties({
+        required this.answer,
+        required this.countries,
+        required this.firstPublishedDate,
+        required this.id,
+        required this.industries,
+        required this.lastPublishedDate,
+        required this.question,
+        required this.topics,
+        required this.tradeRegions,
+        required this.url,
+        required this.worldRegions,
+    });
+
+    factory FaqProperties.fromJson(Map<String, dynamic> json) => FaqProperties(
+        answer: Property.fromJson(json["answer"]),
+        countries: Property.fromJson(json["countries"]),
+        firstPublishedDate: Property.fromJson(json["first_published_date"]),
+        id: Property.fromJson(json["id"]),
+        industries: Property.fromJson(json["industries"]),
+        lastPublishedDate: Property.fromJson(json["last_published_date"]),
+        question: Property.fromJson(json["question"]),
+        topics: Property.fromJson(json["topics"]),
+        tradeRegions: Property.fromJson(json["trade_regions"]),
+        url: Property.fromJson(json["url"]),
+        worldRegions: Property.fromJson(json["world_regions"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "answer": answer.toJson(),
+        "countries": countries.toJson(),
+        "first_published_date": firstPublishedDate.toJson(),
+        "id": id.toJson(),
+        "industries": industries.toJson(),
+        "last_published_date": lastPublishedDate.toJson(),
+        "question": question.toJson(),
+        "topics": topics.toJson(),
+        "trade_regions": tradeRegions.toJson(),
+        "url": url.toJson(),
+        "world_regions": worldRegions.toJson(),
+    };
+}
+
+class Report {
+    final ReportProperties properties;
+
+    Report({
+        required this.properties,
+    });
+
+    factory Report.fromJson(Map<String, dynamic> json) => Report(
+        properties: ReportProperties.fromJson(json["properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+    };
+}
+
+class ReportProperties {
+    final Property countries;
+    final Property description;
+    final Property expirationDate;
+    final Property id;
+    final Property industries;
+    final Property itaIndustries;
+    final Property reportType;
+    final Property title;
+    final Property url;
+
+    ReportProperties({
+        required this.countries,
+        required this.description,
+        required this.expirationDate,
+        required this.id,
+        required this.industries,
+        required this.itaIndustries,
+        required this.reportType,
+        required this.title,
+        required this.url,
+    });
+
+    factory ReportProperties.fromJson(Map<String, dynamic> json) => ReportProperties(
+        countries: Property.fromJson(json["countries"]),
+        description: Property.fromJson(json["description"]),
+        expirationDate: Property.fromJson(json["expiration_date"]),
+        id: Property.fromJson(json["id"]),
+        industries: Property.fromJson(json["industries"]),
+        itaIndustries: Property.fromJson(json["ita_industries"]),
+        reportType: Property.fromJson(json["report_type"]),
+        title: Property.fromJson(json["title"]),
+        url: Property.fromJson(json["url"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "countries": countries.toJson(),
+        "description": description.toJson(),
+        "expiration_date": expirationDate.toJson(),
+        "id": id.toJson(),
+        "industries": industries.toJson(),
+        "ita_industries": itaIndustries.toJson(),
+        "report_type": reportType.toJson(),
+        "title": title.toJson(),
+        "url": url.toJson(),
+    };
+}
+
+class Taxonomy {
+    final TaxonomyProperties properties;
+
+    Taxonomy({
+        required this.properties,
+    });
+
+    factory Taxonomy.fromJson(Map<String, dynamic> json) => Taxonomy(
+        properties: TaxonomyProperties.fromJson(json["properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+    };
+}
+
+class TaxonomyProperties {
+    final Property annotations;
+    final Property datatypeProperties;
+    final Property id;
+    final Property label;
+    final Property subClassOf;
+    final Property type;
+
+    TaxonomyProperties({
+        required this.annotations,
+        required this.datatypeProperties,
+        required this.id,
+        required this.label,
+        required this.subClassOf,
+        required this.type,
+    });
+
+    factory TaxonomyProperties.fromJson(Map<String, dynamic> json) => TaxonomyProperties(
+        annotations: Property.fromJson(json["annotations"]),
+        datatypeProperties: Property.fromJson(json["datatype_properties"]),
+        id: Property.fromJson(json["id"]),
+        label: Property.fromJson(json["label"]),
+        subClassOf: Property.fromJson(json["sub_class_of"]),
+        type: Property.fromJson(json["type"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "annotations": annotations.toJson(),
+        "datatype_properties": datatypeProperties.toJson(),
+        "id": id.toJson(),
+        "label": label.toJson(),
+        "sub_class_of": subClassOf.toJson(),
+        "type": type.toJson(),
+    };
+}
+
+class Info {
+    final String description;
+    final String title;
+    final String version;
+
+    Info({
+        required this.description,
+        required this.title,
+        required this.version,
+    });
+
+    factory Info.fromJson(Map<String, dynamic> json) => Info(
+        description: json["description"],
+        title: json["title"],
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "title": title,
+        "version": version,
+    };
+}
+
+class Paths {
+    final BusinessServiceProvidersSearchClass businessServiceProvidersSearch;
+    final ConsolidatedScreeningListSearchClass consolidatedScreeningListSearch;
+    final ConsolidatedScreeningListSearchClass deMinimisSearch;
+    final ConsolidatedScreeningListSearchClass itaFaqsSearch;
+    final ConsolidatedScreeningListSearchClass itaOfficeLocationsSearch;
+    final BusinessServiceProvidersSearchClass itaTaxonomiesSearch;
+    final BusinessServiceProvidersSearchClass itaZipcodeToPostSearch;
+    final ConsolidatedScreeningListSearchClass marketIntelligenceSearch;
+    final ConsolidatedScreeningListSearchClass marketResearchLibrarySearch;
+    final ConsolidatedScreeningListSearchClass tariffRatesSearch;
+    final ConsolidatedScreeningListSearchClass tradeArticlesSearch;
+    final ConsolidatedScreeningListSearchClass tradeEventsSearch;
+    final ConsolidatedScreeningListSearchClass tradeLeadsSearch;
+
+    Paths({
+        required this.businessServiceProvidersSearch,
+        required this.consolidatedScreeningListSearch,
+        required this.deMinimisSearch,
+        required this.itaFaqsSearch,
+        required this.itaOfficeLocationsSearch,
+        required this.itaTaxonomiesSearch,
+        required this.itaZipcodeToPostSearch,
+        required this.marketIntelligenceSearch,
+        required this.marketResearchLibrarySearch,
+        required this.tariffRatesSearch,
+        required this.tradeArticlesSearch,
+        required this.tradeEventsSearch,
+        required this.tradeLeadsSearch,
+    });
+
+    factory Paths.fromJson(Map<String, dynamic> json) => Paths(
+        businessServiceProvidersSearch: BusinessServiceProvidersSearchClass.fromJson(json["/business_service_providers/search"]),
+        consolidatedScreeningListSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/consolidated_screening_list/search"]),
+        deMinimisSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/de_minimis/search"]),
+        itaFaqsSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/ita_faqs/search"]),
+        itaOfficeLocationsSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/ita_office_locations/search"]),
+        itaTaxonomiesSearch: BusinessServiceProvidersSearchClass.fromJson(json["/ita_taxonomies/search"]),
+        itaZipcodeToPostSearch: BusinessServiceProvidersSearchClass.fromJson(json["/ita_zipcode_to_post/search"]),
+        marketIntelligenceSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/market_intelligence/search"]),
+        marketResearchLibrarySearch: ConsolidatedScreeningListSearchClass.fromJson(json["/market_research_library/search"]),
+        tariffRatesSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/tariff_rates/search"]),
+        tradeArticlesSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/trade_articles/search"]),
+        tradeEventsSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/trade_events/search"]),
+        tradeLeadsSearch: ConsolidatedScreeningListSearchClass.fromJson(json["/trade_leads/search"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "/business_service_providers/search": businessServiceProvidersSearch.toJson(),
+        "/consolidated_screening_list/search": consolidatedScreeningListSearch.toJson(),
+        "/de_minimis/search": deMinimisSearch.toJson(),
+        "/ita_faqs/search": itaFaqsSearch.toJson(),
+        "/ita_office_locations/search": itaOfficeLocationsSearch.toJson(),
+        "/ita_taxonomies/search": itaTaxonomiesSearch.toJson(),
+        "/ita_zipcode_to_post/search": itaZipcodeToPostSearch.toJson(),
+        "/market_intelligence/search": marketIntelligenceSearch.toJson(),
+        "/market_research_library/search": marketResearchLibrarySearch.toJson(),
+        "/tariff_rates/search": tariffRatesSearch.toJson(),
+        "/trade_articles/search": tradeArticlesSearch.toJson(),
+        "/trade_events/search": tradeEventsSearch.toJson(),
+        "/trade_leads/search": tradeLeadsSearch.toJson(),
+    };
+}
+
+class BusinessServiceProvidersSearchClass {
+    final BusinessServiceProvidersSearchGet searchGet;
+
+    BusinessServiceProvidersSearchClass({
+        required this.searchGet,
+    });
+
+    factory BusinessServiceProvidersSearchClass.fromJson(Map<String, dynamic> json) => BusinessServiceProvidersSearchClass(
+        searchGet: BusinessServiceProvidersSearchGet.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": searchGet.toJson(),
+    };
+}
+
+class BusinessServiceProvidersSearchGet {
+    final String description;
+    final List<Parameter> parameters;
+    final PurpleResponses responses;
+    final String summary;
+    final List<String> tags;
+
+    BusinessServiceProvidersSearchGet({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory BusinessServiceProvidersSearchGet.fromJson(Map<String, dynamic> json) => BusinessServiceProvidersSearchGet(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: PurpleResponses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class Parameter {
+    final String description;
+    final FormatEnum format;
+    final String name;
+    final In parameterIn;
+    final bool required;
+    final FormatEnum type;
+
+    Parameter({
+        required this.description,
+        required this.format,
+        required this.name,
+        required this.parameterIn,
+        required this.required,
+        required this.type,
+    });
+
+    factory Parameter.fromJson(Map<String, dynamic> json) => Parameter(
+        description: json["description"],
+        format: formatEnumValues.map[json["format"]]!,
+        name: json["name"],
+        parameterIn: inValues.map[json["in"]]!,
+        required: json["required"],
+        type: formatEnumValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "format": formatEnumValues.reverse[format],
+        "name": name,
+        "in": inValues.reverse[parameterIn],
+        "required": required,
+        "type": formatEnumValues.reverse[type],
+    };
+}
+
+enum In {
+    QUERY
+}
+
+final inValues = EnumValues({
+    "query": In.QUERY
+});
+
+class PurpleResponses {
+    final Purple200 the200;
+
+    PurpleResponses({
+        required this.the200,
+    });
+
+    factory PurpleResponses.fromJson(Map<String, dynamic> json) => PurpleResponses(
+        the200: Purple200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class Purple200 {
+    final String description;
+    final ItemsClass schema;
+
+    Purple200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory Purple200.fromJson(Map<String, dynamic> json) => Purple200(
+        description: json["description"],
+        schema: ItemsClass.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class ItemsClass {
+    final String ref;
+
+    ItemsClass({
+        required this.ref,
+    });
+
+    factory ItemsClass.fromJson(Map<String, dynamic> json) => ItemsClass(
+        ref: json["\u0024ref"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "\u0024ref": ref,
+    };
+}
+
+class ConsolidatedScreeningListSearchClass {
+    final ConsolidatedScreeningListSearchGet searchGet;
+
+    ConsolidatedScreeningListSearchClass({
+        required this.searchGet,
+    });
+
+    factory ConsolidatedScreeningListSearchClass.fromJson(Map<String, dynamic> json) => ConsolidatedScreeningListSearchClass(
+        searchGet: ConsolidatedScreeningListSearchGet.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": searchGet.toJson(),
+    };
+}
+
+class ConsolidatedScreeningListSearchGet {
+    final String description;
+    final List<Parameter> parameters;
+    final FluffyResponses responses;
+    final String summary;
+    final List<String> tags;
+
+    ConsolidatedScreeningListSearchGet({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory ConsolidatedScreeningListSearchGet.fromJson(Map<String, dynamic> json) => ConsolidatedScreeningListSearchGet(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: FluffyResponses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class FluffyResponses {
+    final Fluffy200 the200;
+
+    FluffyResponses({
+        required this.the200,
+    });
+
+    factory FluffyResponses.fromJson(Map<String, dynamic> json) => FluffyResponses(
+        the200: Fluffy200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class Fluffy200 {
+    final String description;
+    final PurpleSchema schema;
+
+    Fluffy200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory Fluffy200.fromJson(Map<String, dynamic> json) => Fluffy200(
+        description: json["description"],
+        schema: PurpleSchema.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class PurpleSchema {
+    final ItemsClass items;
+    final SchemaType type;
+
+    PurpleSchema({
+        required this.items,
+        required this.type,
+    });
+
+    factory PurpleSchema.fromJson(Map<String, dynamic> json) => PurpleSchema(
+        items: ItemsClass.fromJson(json["items"]),
+        type: schemaTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "items": items.toJson(),
+        "type": schemaTypeValues.reverse[type],
+    };
+}
+
+enum SchemaType {
+    ARRAY
+}
+
+final schemaTypeValues = EnumValues({
+    "array": SchemaType.ARRAY
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea838e5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart
@@ -0,0 +1,109 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String designation;
+    final DateTime discoveryDate;
+    final String? hMag;
+    final String iDeg;
+    final String moidAu;
+    final OrbitClass orbitClass;
+    final String? periodYr;
+    final Pha pha;
+    final String qAu1;
+    final String? qAu2;
+
+    TopLevel({
+        required this.designation,
+        required this.discoveryDate,
+        this.hMag,
+        required this.iDeg,
+        required this.moidAu,
+        required this.orbitClass,
+        this.periodYr,
+        required this.pha,
+        required this.qAu1,
+        this.qAu2,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        designation: json["designation"],
+        discoveryDate: DateTime.parse(json["discovery_date"]),
+        hMag: json["h_mag"],
+        iDeg: json["i_deg"],
+        moidAu: json["moid_au"],
+        orbitClass: orbitClassValues.map[json["orbit_class"]]!,
+        periodYr: json["period_yr"],
+        pha: phaValues.map[json["pha"]]!,
+        qAu1: json["q_au_1"],
+        qAu2: json["q_au_2"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "designation": designation,
+        "discovery_date": discoveryDate.toIso8601String(),
+        "h_mag": hMag,
+        "i_deg": iDeg,
+        "moid_au": moidAu,
+        "orbit_class": orbitClassValues.reverse[orbitClass],
+        "period_yr": periodYr,
+        "pha": phaValues.reverse[pha],
+        "q_au_1": qAu1,
+        "q_au_2": qAu2,
+    };
+}
+
+enum OrbitClass {
+    APOLLO,
+    AMOR,
+    ATEN,
+    COMET,
+    JUPITER_FAMILY_COMET,
+    HALLEY_TYPE_COMET,
+    PARABOLIC_COMET,
+    ORBIT_CLASS_JUPITER_FAMILY_COMET,
+    ENCKE_TYPE_COMET
+}
+
+final orbitClassValues = EnumValues({
+    "Apollo": OrbitClass.APOLLO,
+    "Amor": OrbitClass.AMOR,
+    "Aten": OrbitClass.ATEN,
+    "Comet": OrbitClass.COMET,
+    "Jupiter-family Comet": OrbitClass.JUPITER_FAMILY_COMET,
+    "Halley-type Comet*": OrbitClass.HALLEY_TYPE_COMET,
+    "Parabolic Comet": OrbitClass.PARABOLIC_COMET,
+    "Jupiter-family Comet*": OrbitClass.ORBIT_CLASS_JUPITER_FAMILY_COMET,
+    "Encke-type Comet": OrbitClass.ENCKE_TYPE_COMET
+});
+
+enum Pha {
+    Y,
+    N,
+    N_A
+}
+
+final phaValues = EnumValues({
+    "Y": Pha.Y,
+    "N": Pha.N,
+    "n/a": Pha.N_A
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/7d397.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7d397.json/default/TopLevel.dart
new file mode 100644
index 0000000..1c9dabd
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7d397.json/default/TopLevel.dart
@@ -0,0 +1,329 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String basePath;
+    final Definitions definitions;
+    final String host;
+    final Info info;
+    final Paths paths;
+    final List<String> produces;
+    final List<String> schemes;
+    final String swagger;
+
+    TopLevel({
+        required this.basePath,
+        required this.definitions,
+        required this.host,
+        required this.info,
+        required this.paths,
+        required this.produces,
+        required this.schemes,
+        required this.swagger,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        basePath: json["basePath"],
+        definitions: Definitions.fromJson(json["definitions"]),
+        host: json["host"],
+        info: Info.fromJson(json["info"]),
+        paths: Paths.fromJson(json["paths"]),
+        produces: List<String>.from(json["produces"].map((x) => x)),
+        schemes: List<String>.from(json["schemes"].map((x) => x)),
+        swagger: json["swagger"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "basePath": basePath,
+        "definitions": definitions.toJson(),
+        "host": host,
+        "info": info.toJson(),
+        "paths": paths.toJson(),
+        "produces": List<dynamic>.from(produces.map((x) => x)),
+        "schemes": List<dynamic>.from(schemes.map((x) => x)),
+        "swagger": swagger,
+    };
+}
+
+class Definitions {
+    final ListClass list;
+
+    Definitions({
+        required this.list,
+    });
+
+    factory Definitions.fromJson(Map<String, dynamic> json) => Definitions(
+        list: ListClass.fromJson(json["List"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "List": list.toJson(),
+    };
+}
+
+class ListClass {
+    final Map<String, Property> properties;
+
+    ListClass({
+        required this.properties,
+    });
+
+    factory ListClass.fromJson(Map<String, dynamic> json) => ListClass(
+        properties: Map.from(json["properties"]).map((k, v) => MapEntry<String, Property>(k, Property.fromJson(v))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": Map.from(properties).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+    };
+}
+
+class Property {
+    final String description;
+    final Type type;
+
+    Property({
+        required this.description,
+        required this.type,
+    });
+
+    factory Property.fromJson(Map<String, dynamic> json) => Property(
+        description: json["description"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum Type {
+    STRING
+}
+
+final typeValues = EnumValues({
+    "string": Type.STRING
+});
+
+class Info {
+    final String description;
+    final String title;
+    final String version;
+
+    Info({
+        required this.description,
+        required this.title,
+        required this.version,
+    });
+
+    factory Info.fromJson(Map<String, dynamic> json) => Info(
+        description: json["description"],
+        title: json["title"],
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "title": title,
+        "version": version,
+    };
+}
+
+class Paths {
+    final ConsolidatedScreeningListSearch consolidatedScreeningListSearch;
+
+    Paths({
+        required this.consolidatedScreeningListSearch,
+    });
+
+    factory Paths.fromJson(Map<String, dynamic> json) => Paths(
+        consolidatedScreeningListSearch: ConsolidatedScreeningListSearch.fromJson(json["/consolidated_screening_list/search"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "/consolidated_screening_list/search": consolidatedScreeningListSearch.toJson(),
+    };
+}
+
+class ConsolidatedScreeningListSearch {
+    final Get consolidatedScreeningListSearchGet;
+
+    ConsolidatedScreeningListSearch({
+        required this.consolidatedScreeningListSearchGet,
+    });
+
+    factory ConsolidatedScreeningListSearch.fromJson(Map<String, dynamic> json) => ConsolidatedScreeningListSearch(
+        consolidatedScreeningListSearchGet: Get.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": consolidatedScreeningListSearchGet.toJson(),
+    };
+}
+
+class Get {
+    final String description;
+    final List<Parameter> parameters;
+    final Responses responses;
+    final String summary;
+    final List<String> tags;
+
+    Get({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory Get.fromJson(Map<String, dynamic> json) => Get(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: Responses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class Parameter {
+    final String description;
+    final Type format;
+    final String name;
+    final In parameterIn;
+    final bool required;
+    final Type type;
+
+    Parameter({
+        required this.description,
+        required this.format,
+        required this.name,
+        required this.parameterIn,
+        required this.required,
+        required this.type,
+    });
+
+    factory Parameter.fromJson(Map<String, dynamic> json) => Parameter(
+        description: json["description"],
+        format: typeValues.map[json["format"]]!,
+        name: json["name"],
+        parameterIn: inValues.map[json["in"]]!,
+        required: json["required"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "format": typeValues.reverse[format],
+        "name": name,
+        "in": inValues.reverse[parameterIn],
+        "required": required,
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum In {
+    QUERY
+}
+
+final inValues = EnumValues({
+    "query": In.QUERY
+});
+
+class Responses {
+    final The200 the200;
+
+    Responses({
+        required this.the200,
+    });
+
+    factory Responses.fromJson(Map<String, dynamic> json) => Responses(
+        the200: The200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class The200 {
+    final String description;
+    final Schema schema;
+
+    The200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory The200.fromJson(Map<String, dynamic> json) => The200(
+        description: json["description"],
+        schema: Schema.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class Schema {
+    final Items items;
+    final String type;
+
+    Schema({
+        required this.items,
+        required this.type,
+    });
+
+    factory Schema.fromJson(Map<String, dynamic> json) => Schema(
+        items: Items.fromJson(json["items"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "items": items.toJson(),
+        "type": type,
+    };
+}
+
+class Items {
+    final String ref;
+
+    Items({
+        required this.ref,
+    });
+
+    factory Items.fromJson(Map<String, dynamic> json) => Items(
+        ref: json["\u0024ref"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "\u0024ref": ref,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/7d722.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7d722.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7d722.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/7df41.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7df41.json/default/TopLevel.dart
new file mode 100644
index 0000000..c2d05c0
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7df41.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Pc pc;
+    final Pc ps3;
+    final Pc ps4;
+    final Pc xbox;
+    final Pc xone;
+
+    TopLevel({
+        required this.pc,
+        required this.ps3,
+        required this.ps4,
+        required this.xbox,
+        required this.xone,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        pc: Pc.fromJson(json["pc"]),
+        ps3: Pc.fromJson(json["ps3"]),
+        ps4: Pc.fromJson(json["ps4"]),
+        xbox: Pc.fromJson(json["xbox"]),
+        xone: Pc.fromJson(json["xone"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "pc": pc.toJson(),
+        "ps3": ps3.toJson(),
+        "ps4": ps4.toJson(),
+        "xbox": xbox.toJson(),
+        "xone": xone.toJson(),
+    };
+}
+
+class Pc {
+    final int count;
+    final String label;
+    final int peak24;
+
+    Pc({
+        required this.count,
+        required this.label,
+        required this.peak24,
+    });
+
+    factory Pc.fromJson(Map<String, dynamic> json) => Pc(
+        count: json["count"],
+        label: json["label"],
+        peak24: json["peak24"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "label": label,
+        "peak24": peak24,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/7eb30.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7eb30.json/default/TopLevel.dart
new file mode 100644
index 0000000..6958fb2
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7eb30.json/default/TopLevel.dart
@@ -0,0 +1,189 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final String next;
+    final dynamic previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.next,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        next: json["next"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "next": next,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Result {
+    final String code;
+    final String english;
+    final bool fav;
+    final Group group;
+    final Location location;
+    final int minScreens;
+    final int numViews;
+    final String showtimes;
+    final int stars;
+    final Tel tel;
+    final String thai;
+    final int todayScreens;
+    final String url;
+    final String website;
+
+    Result({
+        required this.code,
+        required this.english,
+        required this.fav,
+        required this.group,
+        required this.location,
+        required this.minScreens,
+        required this.numViews,
+        required this.showtimes,
+        required this.stars,
+        required this.tel,
+        required this.thai,
+        required this.todayScreens,
+        required this.url,
+        required this.website,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        code: json["code"],
+        english: json["english"],
+        fav: json["fav"],
+        group: Group.fromJson(json["group"]),
+        location: locationValues.map[json["location"]]!,
+        minScreens: json["min_screens"],
+        numViews: json["num_views"],
+        showtimes: json["showtimes"],
+        stars: json["stars"],
+        tel: telValues.map[json["tel"]]!,
+        thai: json["thai"],
+        todayScreens: json["today_screens"],
+        url: json["url"],
+        website: json["website"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "english": english,
+        "fav": fav,
+        "group": group.toJson(),
+        "location": locationValues.reverse[location],
+        "min_screens": minScreens,
+        "num_views": numViews,
+        "showtimes": showtimes,
+        "stars": stars,
+        "tel": telValues.reverse[tel],
+        "thai": thai,
+        "today_screens": todayScreens,
+        "url": url,
+        "website": website,
+    };
+}
+
+class Group {
+    final Code code;
+    final English english;
+    final Thai thai;
+    final String website;
+
+    Group({
+        required this.code,
+        required this.english,
+        required this.thai,
+        required this.website,
+    });
+
+    factory Group.fromJson(Map<String, dynamic> json) => Group(
+        code: codeValues.map[json["code"]]!,
+        english: englishValues.map[json["english"]]!,
+        thai: thaiValues.map[json["thai"]]!,
+        website: json["website"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": codeValues.reverse[code],
+        "english": englishValues.reverse[english],
+        "thai": thaiValues.reverse[thai],
+        "website": website,
+    };
+}
+
+enum Code {
+    SF
+}
+
+final codeValues = EnumValues({
+    "sf": Code.SF
+});
+
+enum English {
+    SF
+}
+
+final englishValues = EnumValues({
+    "SF": English.SF
+});
+
+enum Thai {
+    EMPTY
+}
+
+final thaiValues = EnumValues({
+    "เอสเอฟ": Thai.EMPTY
+});
+
+enum Location {
+    EMPTY,
+    THE_5_TH_FL_EMPORIUM
+}
+
+final locationValues = EnumValues({
+    "": Location.EMPTY,
+    "5th Fl. Emporium": Location.THE_5_TH_FL_EMPORIUM
+});
+
+enum Tel {
+    EMPTY,
+    THE_022688899
+}
+
+final telValues = EnumValues({
+    "": Tel.EMPTY,
+    "02-268-8899": Tel.THE_022688899
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart
new file mode 100644
index 0000000..cb39318
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart
@@ -0,0 +1,145 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int comments;
+    final String commentsUrl;
+    final String commitsUrl;
+    final DateTime createdAt;
+    final String? description;
+    final Map<String, FileValue> files;
+    final String forksUrl;
+    final String gitPullUrl;
+    final String gitPushUrl;
+    final String htmlUrl;
+    final String id;
+    final bool public;
+    final bool truncated;
+    final DateTime updatedAt;
+    final String url;
+    final dynamic user;
+
+    TopLevel({
+        required this.comments,
+        required this.commentsUrl,
+        required this.commitsUrl,
+        required this.createdAt,
+        required this.description,
+        required this.files,
+        required this.forksUrl,
+        required this.gitPullUrl,
+        required this.gitPushUrl,
+        required this.htmlUrl,
+        required this.id,
+        required this.public,
+        required this.truncated,
+        required this.updatedAt,
+        required this.url,
+        required this.user,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        comments: json["comments"],
+        commentsUrl: json["comments_url"],
+        commitsUrl: json["commits_url"],
+        createdAt: DateTime.parse(json["created_at"]),
+        description: json["description"],
+        files: Map.from(json["files"]).map((k, v) => MapEntry<String, FileValue>(k, FileValue.fromJson(v))),
+        forksUrl: json["forks_url"],
+        gitPullUrl: json["git_pull_url"],
+        gitPushUrl: json["git_push_url"],
+        htmlUrl: json["html_url"],
+        id: json["id"],
+        public: json["public"],
+        truncated: json["truncated"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        url: json["url"],
+        user: json["user"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "comments": comments,
+        "comments_url": commentsUrl,
+        "commits_url": commitsUrl,
+        "created_at": createdAt.toIso8601String(),
+        "description": description,
+        "files": Map.from(files).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "forks_url": forksUrl,
+        "git_pull_url": gitPullUrl,
+        "git_push_url": gitPushUrl,
+        "html_url": htmlUrl,
+        "id": id,
+        "public": public,
+        "truncated": truncated,
+        "updated_at": updatedAt.toIso8601String(),
+        "url": url,
+        "user": user,
+    };
+}
+
+class FileValue {
+    final String filename;
+    final Language? language;
+    final String rawUrl;
+    final int size;
+    final Type type;
+
+    FileValue({
+        required this.filename,
+        required this.language,
+        required this.rawUrl,
+        required this.size,
+        required this.type,
+    });
+
+    factory FileValue.fromJson(Map<String, dynamic> json) => FileValue(
+        filename: json["filename"],
+        language: languageValues.map[json["language"]],
+        rawUrl: json["raw_url"],
+        size: json["size"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "filename": filename,
+        "language": languageValues.reverse[language],
+        "raw_url": rawUrl,
+        "size": size,
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum Language {
+    MARKDOWN
+}
+
+final languageValues = EnumValues({
+    "Markdown": Language.MARKDOWN
+});
+
+enum Type {
+    TEXT_PLAIN
+}
+
+final typeValues = EnumValues({
+    "text/plain": Type.TEXT_PLAIN
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/7fbfb.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7fbfb.json/default/TopLevel.dart
new file mode 100644
index 0000000..dd1ce4d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/7fbfb.json/default/TopLevel.dart
@@ -0,0 +1,121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<dynamic> topLevelFromJson(String str) => List<dynamic>.from(json.decode(str).map((x) => x));
+
+String topLevelToJson(List<dynamic> data) => json.encode(List<dynamic>.from(data.map((x) => x)));
+
+class TopLevelElement {
+    final Country country;
+    final String date;
+    final String decimal;
+    final Country indicator;
+    final String value;
+
+    TopLevelElement({
+        required this.country,
+        required this.date,
+        required this.decimal,
+        required this.indicator,
+        required this.value,
+    });
+
+    factory TopLevelElement.fromJson(Map<String, dynamic> json) => TopLevelElement(
+        country: Country.fromJson(json["country"]),
+        date: json["date"],
+        decimal: json["decimal"],
+        indicator: Country.fromJson(json["indicator"]),
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "country": country.toJson(),
+        "date": date,
+        "decimal": decimal,
+        "indicator": indicator.toJson(),
+        "value": value,
+    };
+}
+
+class Country {
+    final Id id;
+    final Value value;
+
+    Country({
+        required this.id,
+        required this.value,
+    });
+
+    factory Country.fromJson(Map<String, dynamic> json) => Country(
+        id: idValues.map[json["id"]]!,
+        value: valueValues.map[json["value"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": idValues.reverse[id],
+        "value": valueValues.reverse[value],
+    };
+}
+
+enum Id {
+    CN,
+    NY_GDP_MKTP_CD
+}
+
+final idValues = EnumValues({
+    "CN": Id.CN,
+    "NY.GDP.MKTP.CD": Id.NY_GDP_MKTP_CD
+});
+
+enum Value {
+    CHINA,
+    GDP_CURRENT_US
+}
+
+final valueValues = EnumValues({
+    "China": Value.CHINA,
+    "GDP (current US\u0024)": Value.GDP_CURRENT_US
+});
+
+class PurpleTopLevel {
+    final int page;
+    final int pages;
+    final String perPage;
+    final int total;
+
+    PurpleTopLevel({
+        required this.page,
+        required this.pages,
+        required this.perPage,
+        required this.total,
+    });
+
+    factory PurpleTopLevel.fromJson(Map<String, dynamic> json) => PurpleTopLevel(
+        page: json["page"],
+        pages: json["pages"],
+        perPage: json["per_page"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "page": page,
+        "pages": pages,
+        "per_page": perPage,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart
new file mode 100644
index 0000000..2e100ea
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart
@@ -0,0 +1,99 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final bool next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final DateTime createdAt;
+    final int id;
+    final int items;
+    final String name;
+    final int? parent;
+    final DateTime updatedAt;
+    final String uri;
+
+    Result({
+        required this.createdAt,
+        required this.id,
+        required this.items,
+        required this.name,
+        required this.parent,
+        required this.updatedAt,
+        required this.uri,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        createdAt: DateTime.parse(json["created_at"]),
+        id: json["id"],
+        items: json["items"],
+        name: json["name"],
+        parent: json["parent"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "created_at": createdAt.toIso8601String(),
+        "id": id,
+        "items": items,
+        "name": name,
+        "parent": parent,
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/82509.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/82509.json/default/TopLevel.dart
new file mode 100644
index 0000000..c291c38
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/82509.json/default/TopLevel.dart
@@ -0,0 +1,25 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String origin;
+
+    TopLevel({
+        required this.origin,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        origin: json["origin"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "origin": origin,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/8592b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/8592b.json/default/TopLevel.dart
new file mode 100644
index 0000000..a4e83cb
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/8592b.json/default/TopLevel.dart
@@ -0,0 +1,497 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final String? authorFlairCssClass;
+    final String? authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final dynamic distinguished;
+    final String domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final String linkFlairCssClass;
+    final String linkFlairText;
+    final bool locked;
+    final dynamic media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final PostHint? postHint;
+    final Preview? preview;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final dynamic secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final String? selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final SuggestedSort suggestedSort;
+    final String thumbnail;
+    final int? thumbnailHeight;
+    final int? thumbnailWidth;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        this.postHint,
+        this.preview,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.thumbnailHeight,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: json["domain"],
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"],
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        postHint: postHintValues.map[json["post_hint"]],
+        preview: json["preview"] == null ? null : Preview.fromJson(json["preview"]),
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"],
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: suggestedSortValues.map[json["suggested_sort"]]!,
+        thumbnail: json["thumbnail"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domain,
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media,
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "post_hint": postHintValues.reverse[postHint],
+        "preview": preview?.toJson(),
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia,
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSortValues.reverse[suggestedSort],
+        "thumbnail": thumbnail,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+class MediaEmbed {
+    MediaEmbed();
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+enum PostHint {
+    LINK
+}
+
+final postHintValues = EnumValues({
+    "link": PostHint.LINK
+});
+
+class Preview {
+    final bool enabled;
+    final List<Image> images;
+
+    Preview({
+        required this.enabled,
+        required this.images,
+    });
+
+    factory Preview.fromJson(Map<String, dynamic> json) => Preview(
+        enabled: json["enabled"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "enabled": enabled,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+    };
+}
+
+class Image {
+    final String id;
+    final List<Source> resolutions;
+    final Source source;
+    final MediaEmbed variants;
+
+    Image({
+        required this.id,
+        required this.resolutions,
+        required this.source,
+        required this.variants,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        id: json["id"],
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+        variants: MediaEmbed.fromJson(json["variants"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+        "variants": variants.toJson(),
+    };
+}
+
+class Source {
+    final int height;
+    final String url;
+    final int width;
+
+    Source({
+        required this.height,
+        required this.url,
+        required this.width,
+    });
+
+    factory Source.fromJson(Map<String, dynamic> json) => Source(
+        height: json["height"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "url": url,
+        "width": width,
+    };
+}
+
+enum Subreddit {
+    SCIENCE
+}
+
+final subredditValues = EnumValues({
+    "science": Subreddit.SCIENCE
+});
+
+enum SubredditId {
+    T5_MOUW
+}
+
+final subredditIdValues = EnumValues({
+    "t5_mouw": SubredditId.T5_MOUW
+});
+
+enum SubredditNamePrefixed {
+    R_SCIENCE
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/science": SubredditNamePrefixed.R_SCIENCE
+});
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum SuggestedSort {
+    CONFIDENCE,
+    QA
+}
+
+final suggestedSortValues = EnumValues({
+    "confidence": SuggestedSort.CONFIDENCE,
+    "qa": SuggestedSort.QA
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/908db.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/908db.json/default/TopLevel.dart
new file mode 100644
index 0000000..f9d49fe
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/908db.json/default/TopLevel.dart
@@ -0,0 +1,61 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<StateElement> states;
+
+    TopLevel({
+        required this.states,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        states: List<StateElement>.from(json["states"].map((x) => StateElement.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "states": List<dynamic>.from(states.map((x) => x.toJson())),
+    };
+}
+
+class StateElement {
+    final StateState state;
+
+    StateElement({
+        required this.state,
+    });
+
+    factory StateElement.fromJson(Map<String, dynamic> json) => StateElement(
+        state: StateState.fromJson(json["state"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "state": state.toJson(),
+    };
+}
+
+class StateState {
+    final String stateId;
+    final String stateName;
+
+    StateState({
+        required this.stateId,
+        required this.stateName,
+    });
+
+    factory StateState.fromJson(Map<String, dynamic> json) => StateState(
+        stateId: json["state_id"],
+        stateName: json["state_name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "state_id": stateId,
+        "state_name": stateName,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/96f7c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/96f7c.json/default/TopLevel.dart
new file mode 100644
index 0000000..a137ea5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/96f7c.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<String> git;
+    final String githubServicesSha;
+    final List<String> hooks;
+    final List<String> importer;
+    final List<String> pages;
+    final bool verifiablePasswordAuthentication;
+
+    TopLevel({
+        required this.git,
+        required this.githubServicesSha,
+        required this.hooks,
+        required this.importer,
+        required this.pages,
+        required this.verifiablePasswordAuthentication,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        git: List<String>.from(json["git"].map((x) => x)),
+        githubServicesSha: json["github_services_sha"],
+        hooks: List<String>.from(json["hooks"].map((x) => x)),
+        importer: List<String>.from(json["importer"].map((x) => x)),
+        pages: List<String>.from(json["pages"].map((x) => x)),
+        verifiablePasswordAuthentication: json["verifiable_password_authentication"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "git": List<dynamic>.from(git.map((x) => x)),
+        "github_services_sha": githubServicesSha,
+        "hooks": List<dynamic>.from(hooks.map((x) => x)),
+        "importer": List<dynamic>.from(importer.map((x) => x)),
+        "pages": List<dynamic>.from(pages.map((x) => x)),
+        "verifiable_password_authentication": verifiablePasswordAuthentication,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/9847b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9847b.json/default/TopLevel.dart
new file mode 100644
index 0000000..2e634bc
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/9847b.json/default/TopLevel.dart
@@ -0,0 +1,29 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final String name;
+
+    TopLevel({
+        required this.id,
+        required this.name,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "name": name,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/996bd.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/996bd.json/default/TopLevel.dart
new file mode 100644
index 0000000..ec29244
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/996bd.json/default/TopLevel.dart
@@ -0,0 +1,175 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final String? supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    DEP5,
+    SPDX,
+    TROVE
+}
+
+final schemeValues = EnumValues({
+    "DEP5": Scheme.DEP5,
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE
+});
+
+enum Keyword {
+    OSI_APPROVED,
+    POPULAR,
+    COPYLEFT,
+    INTERNATIONAL
+}
+
+final keywordValues = EnumValues({
+    "osi-approved": Keyword.OSI_APPROVED,
+    "popular": Keyword.POPULAR,
+    "copyleft": Keyword.COPYLEFT,
+    "international": Keyword.INTERNATIONAL
+});
+
+class Link {
+    final String note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: json["note"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": note,
+        "url": url,
+    };
+}
+
+class Text {
+    final MediaType mediaType;
+    final Title title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: mediaTypeValues.map[json["media_type"]]!,
+        title: titleValues.map[json["title"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaTypeValues.reverse[mediaType],
+        "title": titleValues.reverse[title],
+        "url": url,
+    };
+}
+
+enum MediaType {
+    TEXT_PLAIN,
+    TEXT_HTML
+}
+
+final mediaTypeValues = EnumValues({
+    "text/plain": MediaType.TEXT_PLAIN,
+    "text/html": MediaType.TEXT_HTML
+});
+
+enum Title {
+    PLAIN_TEXT,
+    HTML
+}
+
+final titleValues = EnumValues({
+    "Plain Text": Title.PLAIN_TEXT,
+    "HTML": Title.HTML
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/9a503.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9a503.json/default/TopLevel.dart
new file mode 100644
index 0000000..c2be9bc
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/9a503.json/default/TopLevel.dart
@@ -0,0 +1,141 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final dynamic supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final String scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: json["scheme"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": scheme,
+    };
+}
+
+enum Keyword {
+    DISCOURAGED,
+    RETIRED,
+    OSI_APPROVED
+}
+
+final keywordValues = EnumValues({
+    "discouraged": Keyword.DISCOURAGED,
+    "retired": Keyword.RETIRED,
+    "osi-approved": Keyword.OSI_APPROVED
+});
+
+class Link {
+    final String note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: json["note"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": note,
+        "url": url,
+    };
+}
+
+class Text {
+    final String mediaType;
+    final String title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: json["media_type"],
+        title: json["title"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaType,
+        "title": title,
+        "url": url,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart
new file mode 100644
index 0000000..93ba04e
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart
@@ -0,0 +1,147 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final String next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final DateTime createdAt;
+    final String entity;
+    final String firstName;
+    final String id;
+    final String lastName;
+    final String name;
+    final String? position;
+    final Status status;
+    final Title? title;
+    final DateTime updatedAt;
+    final String uri;
+
+    Result({
+        required this.createdAt,
+        required this.entity,
+        required this.firstName,
+        required this.id,
+        required this.lastName,
+        required this.name,
+        required this.position,
+        required this.status,
+        required this.title,
+        required this.updatedAt,
+        required this.uri,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        createdAt: DateTime.parse(json["created_at"]),
+        entity: json["entity"],
+        firstName: json["first_name"],
+        id: json["id"],
+        lastName: json["last_name"],
+        name: json["name"],
+        position: json["position"],
+        status: statusValues.map[json["status"]]!,
+        title: titleValues.map[json["title"]],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "created_at": createdAt.toIso8601String(),
+        "entity": entity,
+        "first_name": firstName,
+        "id": id,
+        "last_name": lastName,
+        "name": name,
+        "position": position,
+        "status": statusValues.reverse[status],
+        "title": titleValues.reverse[title],
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+    };
+}
+
+enum Status {
+    INACTIVE,
+    ACTIVE
+}
+
+final statusValues = EnumValues({
+    "inactive": Status.INACTIVE,
+    "active": Status.ACTIVE
+});
+
+enum Title {
+    MR,
+    MS
+}
+
+final titleValues = EnumValues({
+    "Mr": Title.MR,
+    "Ms": Title.MS
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/9eed5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9eed5.json/default/TopLevel.dart
new file mode 100644
index 0000000..31acbed
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/9eed5.json/default/TopLevel.dart
@@ -0,0 +1,139 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<dynamic> otherNames;
+    final dynamic supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<dynamic>.from(json["other_names"].map((x) => x)),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x)),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final String scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: json["scheme"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": scheme,
+    };
+}
+
+enum Keyword {
+    SPECIAL_PURPOSE,
+    OSI_APPROVED
+}
+
+final keywordValues = EnumValues({
+    "special-purpose": Keyword.SPECIAL_PURPOSE,
+    "osi-approved": Keyword.OSI_APPROVED
+});
+
+class Link {
+    final String note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: json["note"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": note,
+        "url": url,
+    };
+}
+
+class Text {
+    final String mediaType;
+    final String title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: json["media_type"],
+        title: json["title"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaType,
+        "title": title,
+        "url": url,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart
new file mode 100644
index 0000000..aedf8b2
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart
@@ -0,0 +1,99 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String code;
+    final List<String> columnNames;
+    final List<List<dynamic>> data;
+    final String description;
+    final String displayUrl;
+    final Errors errors;
+    final String frequency;
+    final DateTime fromDate;
+    final int id;
+    final String name;
+    final bool premium;
+    final String sourceCode;
+    final String sourceName;
+    final DateTime toDate;
+    final String type;
+    final DateTime updatedAt;
+    final String urlizeName;
+
+    TopLevel({
+        required this.code,
+        required this.columnNames,
+        required this.data,
+        required this.description,
+        required this.displayUrl,
+        required this.errors,
+        required this.frequency,
+        required this.fromDate,
+        required this.id,
+        required this.name,
+        required this.premium,
+        required this.sourceCode,
+        required this.sourceName,
+        required this.toDate,
+        required this.type,
+        required this.updatedAt,
+        required this.urlizeName,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        code: json["code"],
+        columnNames: List<String>.from(json["column_names"].map((x) => x)),
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        description: json["description"],
+        displayUrl: json["display_url"],
+        errors: Errors.fromJson(json["errors"]),
+        frequency: json["frequency"],
+        fromDate: DateTime.parse(json["from_date"]),
+        id: json["id"],
+        name: json["name"],
+        premium: json["premium"],
+        sourceCode: json["source_code"],
+        sourceName: json["source_name"],
+        toDate: DateTime.parse(json["to_date"]),
+        type: json["type"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        urlizeName: json["urlize_name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "column_names": List<dynamic>.from(columnNames.map((x) => x)),
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "description": description,
+        "display_url": displayUrl,
+        "errors": errors.toJson(),
+        "frequency": frequency,
+        "from_date": "${fromDate.year.toString().padLeft(4, '0')}-${fromDate.month.toString().padLeft(2, '0')}-${fromDate.day.toString().padLeft(2, '0')}",
+        "id": id,
+        "name": name,
+        "premium": premium,
+        "source_code": sourceCode,
+        "source_name": sourceName,
+        "to_date": "${toDate.year.toString().padLeft(4, '0')}-${toDate.month.toString().padLeft(2, '0')}-${toDate.day.toString().padLeft(2, '0')}",
+        "type": type,
+        "updated_at": updatedAt.toIso8601String(),
+        "urlize_name": urlizeName,
+    };
+}
+
+class Errors {
+    Errors();
+
+    factory Errors.fromJson(Map<String, dynamic> json) => Errors(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/a3d8c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a3d8c.json/default/TopLevel.dart
new file mode 100644
index 0000000..9f622b0
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/a3d8c.json/default/TopLevel.dart
@@ -0,0 +1,483 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final License license;
+    final String licenseId;
+    final String locale;
+    final Metadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final String rowClass;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.license,
+        required this.licenseId,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowClass,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        license: License.fromJson(json["license"]),
+        licenseId: json["licenseId"],
+        locale: json["locale"],
+        metadata: Metadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowClass: json["rowClass"],
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "license": license.toJson(),
+        "licenseId": licenseId,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowClass": rowClass,
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final TypeName dataTypeName;
+    final String fieldName;
+    final List<String>? flags;
+    final Query format;
+    final int id;
+    final String name;
+    final int position;
+    final TypeName renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: typeNameValues.map[json["dataTypeName"]]!,
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Query.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: typeNameValues.map[json["renderTypeName"]]!,
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": typeNameValues.reverse[dataTypeName],
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": typeNameValues.reverse[renderTypeName],
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final String? average;
+    final int cachedContentsNull;
+    final String largest;
+    final int nonNull;
+    final String smallest;
+    final String? sum;
+    final List<Top> top;
+
+    CachedContents({
+        this.average,
+        required this.cachedContentsNull,
+        required this.largest,
+        required this.nonNull,
+        required this.smallest,
+        this.sum,
+        required this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        average: json["average"],
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        sum: json["sum"],
+        top: List<Top>.from(json["top"].map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "average": average,
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "sum": sum,
+        "top": List<dynamic>.from(top.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+enum TypeName {
+    META_DATA,
+    NUMBER,
+    TEXT
+}
+
+final typeNameValues = EnumValues({
+    "meta_data": TypeName.META_DATA,
+    "number": TypeName.NUMBER,
+    "text": TypeName.TEXT
+});
+
+class Query {
+    Query();
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class License {
+    final String name;
+
+    License({
+        required this.name,
+    });
+
+    factory License.fromJson(Map<String, dynamic> json) => License(
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+    };
+}
+
+class Metadata {
+    final List<String> availableDisplayTypes;
+    final String rdfClass;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+    final String rowIdentifier;
+
+    Metadata({
+        required this.availableDisplayTypes,
+        required this.rdfClass,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+        required this.rowIdentifier,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        rdfClass: json["rdfClass"],
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+        rowIdentifier: json["rowIdentifier"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "rdfClass": rdfClass,
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+        "rowIdentifier": rowIdentifier,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "screenName": screenName,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/a45b0.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a45b0.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/a45b0.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/a71df.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a71df.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/a71df.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/ab0d1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ab0d1.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ab0d1.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/ad8be.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ad8be.json/default/TopLevel.dart
new file mode 100644
index 0000000..7405e81
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ad8be.json/default/TopLevel.dart
@@ -0,0 +1,233 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final List<Identifier> identifiers;
+    final List<Keyword> keywords;
+    final List<Link> links;
+    final String name;
+    final List<OtherName> otherNames;
+    final String? supersededBy;
+    final List<Text> text;
+
+    TopLevel({
+        required this.id,
+        required this.identifiers,
+        required this.keywords,
+        required this.links,
+        required this.name,
+        required this.otherNames,
+        required this.supersededBy,
+        required this.text,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        identifiers: List<Identifier>.from(json["identifiers"].map((x) => Identifier.fromJson(x))),
+        keywords: List<Keyword>.from(json["keywords"].map((x) => keywordValues.map[x]!)),
+        links: List<Link>.from(json["links"].map((x) => Link.fromJson(x))),
+        name: json["name"],
+        otherNames: List<OtherName>.from(json["other_names"].map((x) => OtherName.fromJson(x))),
+        supersededBy: json["superseded_by"],
+        text: List<Text>.from(json["text"].map((x) => Text.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "identifiers": List<dynamic>.from(identifiers.map((x) => x.toJson())),
+        "keywords": List<dynamic>.from(keywords.map((x) => keywordValues.reverse[x])),
+        "links": List<dynamic>.from(links.map((x) => x.toJson())),
+        "name": name,
+        "other_names": List<dynamic>.from(otherNames.map((x) => x.toJson())),
+        "superseded_by": supersededBy,
+        "text": List<dynamic>.from(text.map((x) => x.toJson())),
+    };
+}
+
+class Identifier {
+    final String identifier;
+    final Scheme scheme;
+
+    Identifier({
+        required this.identifier,
+        required this.scheme,
+    });
+
+    factory Identifier.fromJson(Map<String, dynamic> json) => Identifier(
+        identifier: json["identifier"],
+        scheme: schemeValues.map[json["scheme"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "identifier": identifier,
+        "scheme": schemeValues.reverse[scheme],
+    };
+}
+
+enum Scheme {
+    SPDX,
+    TROVE,
+    DEP5
+}
+
+final schemeValues = EnumValues({
+    "SPDX": Scheme.SPDX,
+    "Trove": Scheme.TROVE,
+    "DEP5": Scheme.DEP5
+});
+
+enum Keyword {
+    OSI_APPROVED,
+    DISCOURAGED,
+    REDUNDANT,
+    MISCELLANEOUS,
+    NON_REUSABLE,
+    OBSOLETE,
+    POPULAR,
+    PERMISSIVE,
+    RETIRED,
+    SPECIAL_PURPOSE,
+    COPYLEFT,
+    INTERNATIONAL
+}
+
+final keywordValues = EnumValues({
+    "osi-approved": Keyword.OSI_APPROVED,
+    "discouraged": Keyword.DISCOURAGED,
+    "redundant": Keyword.REDUNDANT,
+    "miscellaneous": Keyword.MISCELLANEOUS,
+    "non-reusable": Keyword.NON_REUSABLE,
+    "obsolete": Keyword.OBSOLETE,
+    "popular": Keyword.POPULAR,
+    "permissive": Keyword.PERMISSIVE,
+    "retired": Keyword.RETIRED,
+    "special-purpose": Keyword.SPECIAL_PURPOSE,
+    "copyleft": Keyword.COPYLEFT,
+    "international": Keyword.INTERNATIONAL
+});
+
+class Link {
+    final Note note;
+    final String url;
+
+    Link({
+        required this.note,
+        required this.url,
+    });
+
+    factory Link.fromJson(Map<String, dynamic> json) => Link(
+        note: noteValues.map[json["note"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "note": noteValues.reverse[note],
+        "url": url,
+    };
+}
+
+enum Note {
+    OSI_PAGE,
+    TL_DR_LEGAL,
+    WIKIPEDIA_PAGE,
+    NOTE_WIKIPEDIA_PAGE,
+    MOZILLA_PAGE,
+    OSET_FOUNDATION_PAGE
+}
+
+final noteValues = EnumValues({
+    "OSI Page": Note.OSI_PAGE,
+    "tl;dr legal": Note.TL_DR_LEGAL,
+    "Wikipedia page": Note.WIKIPEDIA_PAGE,
+    "Wikipedia Page": Note.NOTE_WIKIPEDIA_PAGE,
+    "Mozilla Page": Note.MOZILLA_PAGE,
+    "OSET Foundation Page": Note.OSET_FOUNDATION_PAGE
+});
+
+class OtherName {
+    final String name;
+    final String? note;
+
+    OtherName({
+        required this.name,
+        required this.note,
+    });
+
+    factory OtherName.fromJson(Map<String, dynamic> json) => OtherName(
+        name: json["name"],
+        note: json["note"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "note": note,
+    };
+}
+
+class Text {
+    final MediaType mediaType;
+    final Title title;
+    final String url;
+
+    Text({
+        required this.mediaType,
+        required this.title,
+        required this.url,
+    });
+
+    factory Text.fromJson(Map<String, dynamic> json) => Text(
+        mediaType: mediaTypeValues.map[json["media_type"]]!,
+        title: titleValues.map[json["title"]]!,
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "media_type": mediaTypeValues.reverse[mediaType],
+        "title": titleValues.reverse[title],
+        "url": url,
+    };
+}
+
+enum MediaType {
+    TEXT_HTML,
+    TEXT_PLAIN,
+    APPLICATION_PDF
+}
+
+final mediaTypeValues = EnumValues({
+    "text/html": MediaType.TEXT_HTML,
+    "text/plain": MediaType.TEXT_PLAIN,
+    "application/pdf": MediaType.APPLICATION_PDF
+});
+
+enum Title {
+    HTML,
+    PLAIN_TEXT,
+    PDF
+}
+
+final titleValues = EnumValues({
+    "HTML": Title.HTML,
+    "Plain Text": Title.PLAIN_TEXT,
+    "PDF": Title.PDF
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/ae7f0.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ae7f0.json/default/TopLevel.dart
new file mode 100644
index 0000000..c4b2537
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ae7f0.json/default/TopLevel.dart
@@ -0,0 +1,399 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final dynamic authorFlairCssClass;
+    final dynamic authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final dynamic distinguished;
+    final Domain domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final String? linkFlairCssClass;
+    final String? linkFlairText;
+    final bool locked;
+    final dynamic media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final dynamic secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final dynamic selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final dynamic suggestedSort;
+    final String thumbnail;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: domainValues.map[json["domain"]]!,
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"],
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"],
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domainValues.reverse[domain],
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media,
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia,
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+enum Domain {
+    SELF_ASK_REDDIT
+}
+
+final domainValues = EnumValues({
+    "self.AskReddit": Domain.SELF_ASK_REDDIT
+});
+
+class MediaEmbed {
+    MediaEmbed();
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+enum Subreddit {
+    ASK_REDDIT
+}
+
+final subredditValues = EnumValues({
+    "AskReddit": Subreddit.ASK_REDDIT
+});
+
+enum SubredditId {
+    T5_2_QH1_I
+}
+
+final subredditIdValues = EnumValues({
+    "t5_2qh1i": SubredditId.T5_2_QH1_I
+});
+
+enum SubredditNamePrefixed {
+    R_ASK_REDDIT
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/AskReddit": SubredditNamePrefixed.R_ASK_REDDIT
+});
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/ae9ca.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ae9ca.json/default/TopLevel.dart
new file mode 100644
index 0000000..baf0104
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ae9ca.json/default/TopLevel.dart
@@ -0,0 +1,191 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Feature> features;
+    final String name;
+    final String type;
+
+    TopLevel({
+        required this.features,
+        required this.name,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        features: List<Feature>.from(json["features"].map((x) => Feature.fromJson(x))),
+        name: json["name"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "features": List<dynamic>.from(features.map((x) => x.toJson())),
+        "name": name,
+        "type": type,
+    };
+}
+
+class Feature {
+    final Geometry geometry;
+    final Properties properties;
+    final FeatureType type;
+
+    Feature({
+        required this.geometry,
+        required this.properties,
+        required this.type,
+    });
+
+    factory Feature.fromJson(Map<String, dynamic> json) => Feature(
+        geometry: Geometry.fromJson(json["geometry"]),
+        properties: Properties.fromJson(json["properties"]),
+        type: featureTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "geometry": geometry.toJson(),
+        "properties": properties.toJson(),
+        "type": featureTypeValues.reverse[type],
+    };
+}
+
+class Geometry {
+    final List<double> coordinates;
+    final GeometryType type;
+
+    Geometry({
+        required this.coordinates,
+        required this.type,
+    });
+
+    factory Geometry.fromJson(Map<String, dynamic> json) => Geometry(
+        coordinates: List<double>.from(json["coordinates"].map((x) => x?.toDouble())),
+        type: geometryTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "coordinates": List<dynamic>.from(coordinates.map((x) => x)),
+        "type": geometryTypeValues.reverse[type],
+    };
+}
+
+enum GeometryType {
+    POINT
+}
+
+final geometryTypeValues = EnumValues({
+    "Point": GeometryType.POINT
+});
+
+class Properties {
+    final String area;
+    final String centralAssetId;
+    final String featureLocation;
+    final String lat;
+    final String long;
+    final MaintainingAuthority maintainingAuthority;
+    final String number;
+    final Class propertiesClass;
+    final String siteName;
+    final Ward ward;
+
+    Properties({
+        required this.area,
+        required this.centralAssetId,
+        required this.featureLocation,
+        required this.lat,
+        required this.long,
+        required this.maintainingAuthority,
+        required this.number,
+        required this.propertiesClass,
+        required this.siteName,
+        required this.ward,
+    });
+
+    factory Properties.fromJson(Map<String, dynamic> json) => Properties(
+        area: json["Area"],
+        centralAssetId: json["Central Asset ID"],
+        featureLocation: json["Feature Location"],
+        lat: json["lat"],
+        long: json["long"],
+        maintainingAuthority: maintainingAuthorityValues.map[json["Maintaining Authority"]]!,
+        number: json["Number"],
+        propertiesClass: classValues.map[json["Class"]]!,
+        siteName: json["Site Name"],
+        ward: wardValues.map[json["Ward"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Area": area,
+        "Central Asset ID": centralAssetId,
+        "Feature Location": featureLocation,
+        "lat": lat,
+        "long": long,
+        "Maintaining Authority": maintainingAuthorityValues.reverse[maintainingAuthority],
+        "Number": number,
+        "Class": classValues.reverse[propertiesClass],
+        "Site Name": siteName,
+        "Ward": wardValues.reverse[ward],
+    };
+}
+
+enum MaintainingAuthority {
+    CITY_OF_BALLARAT
+}
+
+final maintainingAuthorityValues = EnumValues({
+    "City of Ballarat": MaintainingAuthority.CITY_OF_BALLARAT
+});
+
+enum Class {
+    NO_CODE_ALLOCATED,
+    OS_DISTRICT,
+    OS_NEIGHBOURHOOD,
+    OS_REGIONAL
+}
+
+final classValues = EnumValues({
+    "No Code Allocated": Class.NO_CODE_ALLOCATED,
+    "OS-District": Class.OS_DISTRICT,
+    "OS-Neighbourhood": Class.OS_NEIGHBOURHOOD,
+    "OS-Regional": Class.OS_REGIONAL
+});
+
+enum Ward {
+    SOUTH,
+    NORTH,
+    CENTRAL
+}
+
+final wardValues = EnumValues({
+    "South": Ward.SOUTH,
+    "North": Ward.NORTH,
+    "Central": Ward.CENTRAL
+});
+
+enum FeatureType {
+    FEATURE
+}
+
+final featureTypeValues = EnumValues({
+    "Feature": FeatureType.FEATURE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/af2d1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/af2d1.json/default/TopLevel.dart
new file mode 100644
index 0000000..2f1527c
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/af2d1.json/default/TopLevel.dart
@@ -0,0 +1,405 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Crs crs;
+    final List<Feature> features;
+    final int totalFeatures;
+    final String type;
+
+    TopLevel({
+        required this.crs,
+        required this.features,
+        required this.totalFeatures,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        crs: Crs.fromJson(json["crs"]),
+        features: List<Feature>.from(json["features"].map((x) => Feature.fromJson(x))),
+        totalFeatures: json["totalFeatures"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "crs": crs.toJson(),
+        "features": List<dynamic>.from(features.map((x) => x.toJson())),
+        "totalFeatures": totalFeatures,
+        "type": type,
+    };
+}
+
+class Crs {
+    final CrsProperties properties;
+    final String type;
+
+    Crs({
+        required this.properties,
+        required this.type,
+    });
+
+    factory Crs.fromJson(Map<String, dynamic> json) => Crs(
+        properties: CrsProperties.fromJson(json["properties"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+        "type": type,
+    };
+}
+
+class CrsProperties {
+    final String name;
+
+    CrsProperties({
+        required this.name,
+    });
+
+    factory CrsProperties.fromJson(Map<String, dynamic> json) => CrsProperties(
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+    };
+}
+
+class Feature {
+    final Geometry geometry;
+    final GeometryName geometryName;
+    final String id;
+    final FeatureProperties properties;
+    final FeatureType type;
+
+    Feature({
+        required this.geometry,
+        required this.geometryName,
+        required this.id,
+        required this.properties,
+        required this.type,
+    });
+
+    factory Feature.fromJson(Map<String, dynamic> json) => Feature(
+        geometry: Geometry.fromJson(json["geometry"]),
+        geometryName: geometryNameValues.map[json["geometry_name"]]!,
+        id: json["id"],
+        properties: FeatureProperties.fromJson(json["properties"]),
+        type: featureTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "geometry": geometry.toJson(),
+        "geometry_name": geometryNameValues.reverse[geometryName],
+        "id": id,
+        "properties": properties.toJson(),
+        "type": featureTypeValues.reverse[type],
+    };
+}
+
+class Geometry {
+    final List<List<List<List<double>>>> coordinates;
+    final GeometryType type;
+
+    Geometry({
+        required this.coordinates,
+        required this.type,
+    });
+
+    factory Geometry.fromJson(Map<String, dynamic> json) => Geometry(
+        coordinates: List<List<List<List<double>>>>.from(json["coordinates"].map((x) => List<List<List<double>>>.from(x.map((x) => List<List<double>>.from(x.map((x) => List<double>.from(x.map((x) => x?.toDouble())))))))),
+        type: geometryTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "coordinates": List<dynamic>.from(coordinates.map((x) => List<dynamic>.from(x.map((x) => List<dynamic>.from(x.map((x) => List<dynamic>.from(x.map((x) => x)))))))),
+        "type": geometryTypeValues.reverse[type],
+    };
+}
+
+enum GeometryType {
+    MULTI_POLYGON
+}
+
+final geometryTypeValues = EnumValues({
+    "MultiPolygon": GeometryType.MULTI_POLYGON
+});
+
+enum GeometryName {
+    GEOM
+}
+
+final geometryNameValues = EnumValues({
+    "geom": GeometryName.GEOM
+});
+
+class FeatureProperties {
+    final AddImprov? addImprov;
+    final double area;
+    final String assetNumb;
+    final String? comments;
+    final int condition;
+    final String? constructi;
+    final dynamic createdate;
+    final dynamic createuser;
+    final dynamic disposalD;
+    final String documents;
+    final String? drawingNu;
+    final String? fileNumbe;
+    final String? folderNum;
+    final FundingBa? fundingBa;
+    final int historicC;
+    final String inspection;
+    final dynamic inspectors;
+    final dynamic lastUpdat;
+    final LevelAccu? levelAccu;
+    final Material material;
+    final int miPrinx;
+    final MiSymbolo miSymbolo;
+    final int numberLan;
+    final String? owner;
+    final LevelAccu? positional;
+    final String? projectNu;
+    final int recId;
+    final String? recordCre;
+    final double shapeArea;
+    final double shapeLeng;
+    final Status status;
+    final dynamic surveyNum;
+    final double toeRl;
+    final double topRl;
+    final PropertiesType? type;
+    final String updateDat;
+    final dynamic updatedate;
+    final dynamic updateuser;
+
+    FeatureProperties({
+        required this.addImprov,
+        required this.area,
+        required this.assetNumb,
+        required this.comments,
+        required this.condition,
+        required this.constructi,
+        required this.createdate,
+        required this.createuser,
+        required this.disposalD,
+        required this.documents,
+        required this.drawingNu,
+        required this.fileNumbe,
+        required this.folderNum,
+        required this.fundingBa,
+        required this.historicC,
+        required this.inspection,
+        required this.inspectors,
+        required this.lastUpdat,
+        required this.levelAccu,
+        required this.material,
+        required this.miPrinx,
+        required this.miSymbolo,
+        required this.numberLan,
+        required this.owner,
+        required this.positional,
+        required this.projectNu,
+        required this.recId,
+        required this.recordCre,
+        required this.shapeArea,
+        required this.shapeLeng,
+        required this.status,
+        required this.surveyNum,
+        required this.toeRl,
+        required this.topRl,
+        required this.type,
+        required this.updateDat,
+        required this.updatedate,
+        required this.updateuser,
+    });
+
+    factory FeatureProperties.fromJson(Map<String, dynamic> json) => FeatureProperties(
+        addImprov: addImprovValues.map[json["add_improv"]],
+        area: json["area_"]?.toDouble(),
+        assetNumb: json["asset_numb"],
+        comments: json["comments"],
+        condition: json["condition"],
+        constructi: json["constructi"],
+        createdate: json["createdate"],
+        createuser: json["createuser"],
+        disposalD: json["disposal_d"],
+        documents: json["documents"],
+        drawingNu: json["drawing_nu"],
+        fileNumbe: json["file_numbe"],
+        folderNum: json["folder_num"],
+        fundingBa: fundingBaValues.map[json["funding_ba"]],
+        historicC: json["historic_c"],
+        inspection: json["inspection"],
+        inspectors: json["inspectors"],
+        lastUpdat: json["last_updat"],
+        levelAccu: levelAccuValues.map[json["level_accu"]],
+        material: materialValues.map[json["material"]]!,
+        miPrinx: json["mi_prinx"],
+        miSymbolo: miSymboloValues.map[json["mi_symbolo"]]!,
+        numberLan: json["number_lan"],
+        owner: json["owner"],
+        positional: levelAccuValues.map[json["positional"]],
+        projectNu: json["project_nu"],
+        recId: json["rec_id"],
+        recordCre: json["record_cre"],
+        shapeArea: json["shape_area"]?.toDouble(),
+        shapeLeng: json["shape_leng"]?.toDouble(),
+        status: statusValues.map[json["status"]]!,
+        surveyNum: json["survey_num"],
+        toeRl: json["toe_rl"]?.toDouble(),
+        topRl: json["top_rl"]?.toDouble(),
+        type: propertiesTypeValues.map[json["type"]],
+        updateDat: json["update_dat"],
+        updatedate: json["updatedate"],
+        updateuser: json["updateuser"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "add_improv": addImprovValues.reverse[addImprov],
+        "area_": area,
+        "asset_numb": assetNumb,
+        "comments": comments,
+        "condition": condition,
+        "constructi": constructi,
+        "createdate": createdate,
+        "createuser": createuser,
+        "disposal_d": disposalD,
+        "documents": documents,
+        "drawing_nu": drawingNu,
+        "file_numbe": fileNumbe,
+        "folder_num": folderNum,
+        "funding_ba": fundingBaValues.reverse[fundingBa],
+        "historic_c": historicC,
+        "inspection": inspection,
+        "inspectors": inspectors,
+        "last_updat": lastUpdat,
+        "level_accu": levelAccuValues.reverse[levelAccu],
+        "material": materialValues.reverse[material],
+        "mi_prinx": miPrinx,
+        "mi_symbolo": miSymboloValues.reverse[miSymbolo],
+        "number_lan": numberLan,
+        "owner": owner,
+        "positional": levelAccuValues.reverse[positional],
+        "project_nu": projectNu,
+        "rec_id": recId,
+        "record_cre": recordCre,
+        "shape_area": shapeArea,
+        "shape_leng": shapeLeng,
+        "status": statusValues.reverse[status],
+        "survey_num": surveyNum,
+        "toe_rl": toeRl,
+        "top_rl": topRl,
+        "type": propertiesTypeValues.reverse[type],
+        "update_dat": updateDat,
+        "updatedate": updatedate,
+        "updateuser": updateuser,
+    };
+}
+
+enum AddImprov {
+    F,
+    ADD_IMPROV_F,
+    T
+}
+
+final addImprovValues = EnumValues({
+    "f": AddImprov.F,
+    "F": AddImprov.ADD_IMPROV_F,
+    "t": AddImprov.T
+});
+
+enum FundingBa {
+    NON_GCCC,
+    CAPEX,
+    INITIAL,
+    CONTRIBUTE
+}
+
+final fundingBaValues = EnumValues({
+    "Non GCCC": FundingBa.NON_GCCC,
+    "Capex": FundingBa.CAPEX,
+    "Initial": FundingBa.INITIAL,
+    "Contribute": FundingBa.CONTRIBUTE
+});
+
+enum LevelAccu {
+    GPS_CORRECTED_10_M,
+    APPROX,
+    GPS_C_ORRECTED_10_M
+}
+
+final levelAccuValues = EnumValues({
+    "GPS Corrected 1.0M": LevelAccu.GPS_CORRECTED_10_M,
+    "APPROX": LevelAccu.APPROX,
+    "GPS COrrected 1.0M": LevelAccu.GPS_C_ORRECTED_10_M
+});
+
+enum Material {
+    GRAVEL,
+    CONCRETE,
+    BITUMEN,
+    INTERLOCK_CONC_BLOCK,
+    OTHER,
+    EARTH
+}
+
+final materialValues = EnumValues({
+    "Gravel": Material.GRAVEL,
+    "Concrete": Material.CONCRETE,
+    "Bitumen": Material.BITUMEN,
+    "Interlock Conc Block": Material.INTERLOCK_CONC_BLOCK,
+    "Other": Material.OTHER,
+    "Earth": Material.EARTH
+});
+
+enum MiSymbolo {
+    PEN_2265535_BRUSH_1016777215
+}
+
+final miSymboloValues = EnumValues({
+    "Pen (2, 2, 65535) Brush (1, 0, 16777215)": MiSymbolo.PEN_2265535_BRUSH_1016777215
+});
+
+enum Status {
+    CURRENT
+}
+
+final statusValues = EnumValues({
+    "CURRENT": Status.CURRENT
+});
+
+enum PropertiesType {
+    BOAT_RAMP
+}
+
+final propertiesTypeValues = EnumValues({
+    "Boat Ramp": PropertiesType.BOAT_RAMP
+});
+
+enum FeatureType {
+    FEATURE
+}
+
+final featureTypeValues = EnumValues({
+    "Feature": FeatureType.FEATURE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart
new file mode 100644
index 0000000..85cc95e
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart
@@ -0,0 +1,127 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String? computedRegionCbhkFwbd;
+    final String? computedRegionNnqa25F4;
+    final Fall fall;
+    final Geolocation? geolocation;
+    final String id;
+    final String? mass;
+    final String name;
+    final Nametype nametype;
+    final String recclass;
+    final String? reclat;
+    final String? reclong;
+    final DateTime? year;
+
+    TopLevel({
+        this.computedRegionCbhkFwbd,
+        this.computedRegionNnqa25F4,
+        required this.fall,
+        this.geolocation,
+        required this.id,
+        this.mass,
+        required this.name,
+        required this.nametype,
+        required this.recclass,
+        this.reclat,
+        this.reclong,
+        this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        computedRegionCbhkFwbd: json[":@computed_region_cbhk_fwbd"],
+        computedRegionNnqa25F4: json[":@computed_region_nnqa_25f4"],
+        fall: fallValues.map[json["fall"]]!,
+        geolocation: json["geolocation"] == null ? null : Geolocation.fromJson(json["geolocation"]),
+        id: json["id"],
+        mass: json["mass"],
+        name: json["name"],
+        nametype: nametypeValues.map[json["nametype"]]!,
+        recclass: json["recclass"],
+        reclat: json["reclat"],
+        reclong: json["reclong"],
+        year: json["year"] == null ? null : DateTime.parse(json["year"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        ":@computed_region_cbhk_fwbd": computedRegionCbhkFwbd,
+        ":@computed_region_nnqa_25f4": computedRegionNnqa25F4,
+        "fall": fallValues.reverse[fall],
+        "geolocation": geolocation?.toJson(),
+        "id": id,
+        "mass": mass,
+        "name": name,
+        "nametype": nametypeValues.reverse[nametype],
+        "recclass": recclass,
+        "reclat": reclat,
+        "reclong": reclong,
+        "year": year?.toIso8601String(),
+    };
+}
+
+enum Fall {
+    FELL,
+    FOUND
+}
+
+final fallValues = EnumValues({
+    "Fell": Fall.FELL,
+    "Found": Fall.FOUND
+});
+
+class Geolocation {
+    final List<double> coordinates;
+    final Type type;
+
+    Geolocation({
+        required this.coordinates,
+        required this.type,
+    });
+
+    factory Geolocation.fromJson(Map<String, dynamic> json) => Geolocation(
+        coordinates: List<double>.from(json["coordinates"].map((x) => x?.toDouble())),
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "coordinates": List<dynamic>.from(coordinates.map((x) => x)),
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum Type {
+    POINT
+}
+
+final typeValues = EnumValues({
+    "Point": Type.POINT
+});
+
+enum Nametype {
+    VALID
+}
+
+final nametypeValues = EnumValues({
+    "Valid": Nametype.VALID
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/b6fe5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/b6fe5.json/default/TopLevel.dart
new file mode 100644
index 0000000..1fa3342
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/b6fe5.json/default/TopLevel.dart
@@ -0,0 +1,37 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String group;
+    final String movie;
+    final String movieImage;
+    final String theater;
+
+    TopLevel({
+        required this.group,
+        required this.movie,
+        required this.movieImage,
+        required this.theater,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        group: json["group"],
+        movie: json["movie"],
+        movieImage: json["movie-image"],
+        theater: json["theater"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "group": group,
+        "movie": movie,
+        "movie-image": movieImage,
+        "theater": theater,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/b9f64.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/b9f64.json/default/TopLevel.dart
new file mode 100644
index 0000000..d50217b
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/b9f64.json/default/TopLevel.dart
@@ -0,0 +1,25 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String userAgent;
+
+    TopLevel({
+        required this.userAgent,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        userAgent: json["user-agent"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "user-agent": userAgent,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/be234.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/be234.json/default/TopLevel.dart
new file mode 100644
index 0000000..e682854
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/be234.json/default/TopLevel.dart
@@ -0,0 +1,645 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final dynamic authorFlairCssClass;
+    final String? authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final String? distinguished;
+    final Domain domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final dynamic linkFlairCssClass;
+    final dynamic linkFlairText;
+    final bool locked;
+    final Media? media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final PostHint postHint;
+    final Preview preview;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final Media? secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final dynamic selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final dynamic suggestedSort;
+    final String thumbnail;
+    final int thumbnailHeight;
+    final int thumbnailWidth;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        required this.postHint,
+        required this.preview,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.thumbnailHeight,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: domainValues.map[json["domain"]]!,
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"] == null ? null : Media.fromJson(json["media"]),
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        postHint: postHintValues.map[json["post_hint"]]!,
+        preview: Preview.fromJson(json["preview"]),
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"] == null ? null : Media.fromJson(json["secure_media"]),
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domainValues.reverse[domain],
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media?.toJson(),
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "post_hint": postHintValues.reverse[postHint],
+        "preview": preview.toJson(),
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia?.toJson(),
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+enum Domain {
+    REDDIT_COM,
+    I_REDD_IT,
+    I_IMGUR_COM,
+    GFYCAT_COM,
+    IMGUR_COM
+}
+
+final domainValues = EnumValues({
+    "reddit.com": Domain.REDDIT_COM,
+    "i.redd.it": Domain.I_REDD_IT,
+    "i.imgur.com": Domain.I_IMGUR_COM,
+    "gfycat.com": Domain.GFYCAT_COM,
+    "imgur.com": Domain.IMGUR_COM
+});
+
+class Media {
+    final Oembed oembed;
+    final Domain type;
+
+    Media({
+        required this.oembed,
+        required this.type,
+    });
+
+    factory Media.fromJson(Map<String, dynamic> json) => Media(
+        oembed: Oembed.fromJson(json["oembed"]),
+        type: domainValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "oembed": oembed.toJson(),
+        "type": domainValues.reverse[type],
+    };
+}
+
+class Oembed {
+    final String description;
+    final int height;
+    final String html;
+    final String providerName;
+    final String providerUrl;
+    final int thumbnailHeight;
+    final String thumbnailUrl;
+    final int thumbnailWidth;
+    final String title;
+    final String type;
+    final String version;
+    final int width;
+
+    Oembed({
+        required this.description,
+        required this.height,
+        required this.html,
+        required this.providerName,
+        required this.providerUrl,
+        required this.thumbnailHeight,
+        required this.thumbnailUrl,
+        required this.thumbnailWidth,
+        required this.title,
+        required this.type,
+        required this.version,
+        required this.width,
+    });
+
+    factory Oembed.fromJson(Map<String, dynamic> json) => Oembed(
+        description: json["description"],
+        height: json["height"],
+        html: json["html"],
+        providerName: json["provider_name"],
+        providerUrl: json["provider_url"],
+        thumbnailHeight: json["thumbnail_height"],
+        thumbnailUrl: json["thumbnail_url"],
+        thumbnailWidth: json["thumbnail_width"],
+        title: json["title"],
+        type: json["type"],
+        version: json["version"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "height": height,
+        "html": html,
+        "provider_name": providerName,
+        "provider_url": providerUrl,
+        "thumbnail_height": thumbnailHeight,
+        "thumbnail_url": thumbnailUrl,
+        "thumbnail_width": thumbnailWidth,
+        "title": title,
+        "type": type,
+        "version": version,
+        "width": width,
+    };
+}
+
+class MediaEmbed {
+    final String? content;
+    final int? height;
+    final bool? scrolling;
+    final int? width;
+
+    MediaEmbed({
+        this.content,
+        this.height,
+        this.scrolling,
+        this.width,
+    });
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+        content: json["content"],
+        height: json["height"],
+        scrolling: json["scrolling"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "content": content,
+        "height": height,
+        "scrolling": scrolling,
+        "width": width,
+    };
+}
+
+enum PostHint {
+    LINK,
+    IMAGE,
+    RICH_VIDEO
+}
+
+final postHintValues = EnumValues({
+    "link": PostHint.LINK,
+    "image": PostHint.IMAGE,
+    "rich:video": PostHint.RICH_VIDEO
+});
+
+class Preview {
+    final bool enabled;
+    final List<Image> images;
+
+    Preview({
+        required this.enabled,
+        required this.images,
+    });
+
+    factory Preview.fromJson(Map<String, dynamic> json) => Preview(
+        enabled: json["enabled"],
+        images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "enabled": enabled,
+        "images": List<dynamic>.from(images.map((x) => x.toJson())),
+    };
+}
+
+class Image {
+    final String id;
+    final List<Source> resolutions;
+    final Source source;
+    final Variants variants;
+
+    Image({
+        required this.id,
+        required this.resolutions,
+        required this.source,
+        required this.variants,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        id: json["id"],
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+        variants: Variants.fromJson(json["variants"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+        "variants": variants.toJson(),
+    };
+}
+
+class Source {
+    final int height;
+    final String url;
+    final int width;
+
+    Source({
+        required this.height,
+        required this.url,
+        required this.width,
+    });
+
+    factory Source.fromJson(Map<String, dynamic> json) => Source(
+        height: json["height"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Variants {
+    final Gif? gif;
+    final Gif? mp4;
+
+    Variants({
+        this.gif,
+        this.mp4,
+    });
+
+    factory Variants.fromJson(Map<String, dynamic> json) => Variants(
+        gif: json["gif"] == null ? null : Gif.fromJson(json["gif"]),
+        mp4: json["mp4"] == null ? null : Gif.fromJson(json["mp4"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "gif": gif?.toJson(),
+        "mp4": mp4?.toJson(),
+    };
+}
+
+class Gif {
+    final List<Source> resolutions;
+    final Source source;
+
+    Gif({
+        required this.resolutions,
+        required this.source,
+    });
+
+    factory Gif.fromJson(Map<String, dynamic> json) => Gif(
+        resolutions: List<Source>.from(json["resolutions"].map((x) => Source.fromJson(x))),
+        source: Source.fromJson(json["source"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "resolutions": List<dynamic>.from(resolutions.map((x) => x.toJson())),
+        "source": source.toJson(),
+    };
+}
+
+enum Subreddit {
+    FUNNY
+}
+
+final subredditValues = EnumValues({
+    "funny": Subreddit.FUNNY
+});
+
+enum SubredditId {
+    T5_2_QH33
+}
+
+final subredditIdValues = EnumValues({
+    "t5_2qh33": SubredditId.T5_2_QH33
+});
+
+enum SubredditNamePrefixed {
+    R_FUNNY
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/funny": SubredditNamePrefixed.R_FUNNY
+});
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/c0356.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/c0356.json/default/TopLevel.dart
new file mode 100644
index 0000000..5bdc78b
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/c0356.json/default/TopLevel.dart
@@ -0,0 +1,73 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Map<String, Datum> data;
+    final Description description;
+
+    TopLevel({
+        required this.data,
+        required this.description,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: Map.from(json["data"]).map((k, v) => MapEntry<String, Datum>(k, Datum.fromJson(v))),
+        description: Description.fromJson(json["description"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": Map.from(data).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "description": description.toJson(),
+    };
+}
+
+class Datum {
+    final String anomaly;
+    final String value;
+
+    Datum({
+        required this.anomaly,
+        required this.value,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        anomaly: json["anomaly"],
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "anomaly": anomaly,
+        "value": value,
+    };
+}
+
+class Description {
+    final String basePeriod;
+    final int missing;
+    final String title;
+
+    Description({
+        required this.basePeriod,
+        required this.missing,
+        required this.title,
+    });
+
+    factory Description.fromJson(Map<String, dynamic> json) => Description(
+        basePeriod: json["base_period"],
+        missing: json["missing"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base_period": basePeriod,
+        "missing": missing,
+        "title": title,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/c0a3a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/c0a3a.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/c0a3a.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/c3303.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/c3303.json/default/TopLevel.dart
new file mode 100644
index 0000000..f4cb7c1
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/c3303.json/default/TopLevel.dart
@@ -0,0 +1,471 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final Username username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": usernameValues.reverse[username],
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+    final Downsized? the480WStill;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+        this.the480WStill,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+        the480WStill: json["480w_still"] == null ? null : Downsized.fromJson(json["480w_still"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+        "480w_still": the480WStill?.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    PG,
+    G,
+    PG_13
+}
+
+final ratingValues = EnumValues({
+    "pg": Rating.PG,
+    "g": Rating.G,
+    "pg-13": Rating.PG_13
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final Username username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "username": usernameValues.reverse[username],
+    };
+}
+
+enum Username {
+    EMPTY,
+    DISNEYPIXAR
+}
+
+final usernameValues = EnumValues({
+    "": Username.EMPTY,
+    "disneypixar": Username.DISNEYPIXAR
+});
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/c6cfd.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/c6cfd.json/default/TopLevel.dart
new file mode 100644
index 0000000..269377d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/c6cfd.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Country> countries;
+
+    TopLevel({
+        required this.countries,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        countries: List<Country>.from(json["countries"].map((x) => Country.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "countries": List<dynamic>.from(countries.map((x) => x.toJson())),
+    };
+}
+
+class Country {
+    final String code;
+    final String name;
+
+    Country({
+        required this.code,
+        required this.name,
+    });
+
+    factory Country.fromJson(Map<String, dynamic> json) => Country(
+        code: json["code"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "name": name,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/c8c7e.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/c8c7e.json/default/TopLevel.dart
new file mode 100644
index 0000000..1058232
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/c8c7e.json/default/TopLevel.dart
@@ -0,0 +1,121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<dynamic> topLevelFromJson(String str) => List<dynamic>.from(json.decode(str).map((x) => x));
+
+String topLevelToJson(List<dynamic> data) => json.encode(List<dynamic>.from(data.map((x) => x)));
+
+class TopLevelElement {
+    final Country country;
+    final String date;
+    final String decimal;
+    final Country indicator;
+    final String value;
+
+    TopLevelElement({
+        required this.country,
+        required this.date,
+        required this.decimal,
+        required this.indicator,
+        required this.value,
+    });
+
+    factory TopLevelElement.fromJson(Map<String, dynamic> json) => TopLevelElement(
+        country: Country.fromJson(json["country"]),
+        date: json["date"],
+        decimal: json["decimal"],
+        indicator: Country.fromJson(json["indicator"]),
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "country": country.toJson(),
+        "date": date,
+        "decimal": decimal,
+        "indicator": indicator.toJson(),
+        "value": value,
+    };
+}
+
+class Country {
+    final Id id;
+    final Value value;
+
+    Country({
+        required this.id,
+        required this.value,
+    });
+
+    factory Country.fromJson(Map<String, dynamic> json) => Country(
+        id: idValues.map[json["id"]]!,
+        value: valueValues.map[json["value"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": idValues.reverse[id],
+        "value": valueValues.reverse[value],
+    };
+}
+
+enum Id {
+    IN,
+    NY_GDP_MKTP_CD
+}
+
+final idValues = EnumValues({
+    "IN": Id.IN,
+    "NY.GDP.MKTP.CD": Id.NY_GDP_MKTP_CD
+});
+
+enum Value {
+    INDIA,
+    GDP_CURRENT_US
+}
+
+final valueValues = EnumValues({
+    "India": Value.INDIA,
+    "GDP (current US\u0024)": Value.GDP_CURRENT_US
+});
+
+class PurpleTopLevel {
+    final int page;
+    final int pages;
+    final String perPage;
+    final int total;
+
+    PurpleTopLevel({
+        required this.page,
+        required this.pages,
+        required this.perPage,
+        required this.total,
+    });
+
+    factory PurpleTopLevel.fromJson(Map<String, dynamic> json) => PurpleTopLevel(
+        page: json["page"],
+        pages: json["pages"],
+        perPage: json["per_page"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "page": page,
+        "pages": pages,
+        "per_page": perPage,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/cb0cc.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cb0cc.json/default/TopLevel.dart
new file mode 100644
index 0000000..060495e
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cb0cc.json/default/TopLevel.dart
@@ -0,0 +1,115 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Prize> prizes;
+
+    TopLevel({
+        required this.prizes,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        prizes: List<Prize>.from(json["prizes"].map((x) => Prize.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "prizes": List<dynamic>.from(prizes.map((x) => x.toJson())),
+    };
+}
+
+class Prize {
+    final Category category;
+    final List<Laureate> laureates;
+    final String? overallMotivation;
+    final String year;
+
+    Prize({
+        required this.category,
+        required this.laureates,
+        this.overallMotivation,
+        required this.year,
+    });
+
+    factory Prize.fromJson(Map<String, dynamic> json) => Prize(
+        category: categoryValues.map[json["category"]]!,
+        laureates: List<Laureate>.from(json["laureates"].map((x) => Laureate.fromJson(x))),
+        overallMotivation: json["overallMotivation"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "category": categoryValues.reverse[category],
+        "laureates": List<dynamic>.from(laureates.map((x) => x.toJson())),
+        "overallMotivation": overallMotivation,
+        "year": year,
+    };
+}
+
+enum Category {
+    PHYSICS,
+    CHEMISTRY,
+    MEDICINE,
+    LITERATURE,
+    PEACE,
+    ECONOMICS
+}
+
+final categoryValues = EnumValues({
+    "physics": Category.PHYSICS,
+    "chemistry": Category.CHEMISTRY,
+    "medicine": Category.MEDICINE,
+    "literature": Category.LITERATURE,
+    "peace": Category.PEACE,
+    "economics": Category.ECONOMICS
+});
+
+class Laureate {
+    final String firstname;
+    final String id;
+    final String? motivation;
+    final String share;
+    final String surname;
+
+    Laureate({
+        required this.firstname,
+        required this.id,
+        this.motivation,
+        required this.share,
+        required this.surname,
+    });
+
+    factory Laureate.fromJson(Map<String, dynamic> json) => Laureate(
+        firstname: json["firstname"],
+        id: json["id"],
+        motivation: json["motivation"],
+        share: json["share"],
+        surname: json["surname"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "firstname": firstname,
+        "id": id,
+        "motivation": motivation,
+        "share": share,
+        "surname": surname,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/cb81e.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cb81e.json/default/TopLevel.dart
new file mode 100644
index 0000000..040b7db
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cb81e.json/default/TopLevel.dart
@@ -0,0 +1,57 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Map<String, String> data;
+    final Description description;
+
+    TopLevel({
+        required this.data,
+        required this.description,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: Map.from(json["data"]).map((k, v) => MapEntry<String, String>(k, v)),
+        description: Description.fromJson(json["description"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": Map.from(data).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "description": description.toJson(),
+    };
+}
+
+class Description {
+    final String basePeriod;
+    final String missing;
+    final String title;
+    final String units;
+
+    Description({
+        required this.basePeriod,
+        required this.missing,
+        required this.title,
+        required this.units,
+    });
+
+    factory Description.fromJson(Map<String, dynamic> json) => Description(
+        basePeriod: json["base_period"],
+        missing: json["missing"],
+        title: json["title"],
+        units: json["units"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base_period": basePeriod,
+        "missing": missing,
+        "title": title,
+        "units": units,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/ccd18.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ccd18.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ccd18.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/cd238.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cd238.json/default/TopLevel.dart
new file mode 100644
index 0000000..4f134f5
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cd238.json/default/TopLevel.dart
@@ -0,0 +1,157 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String city;
+    final String delay;
+    final String iata;
+    final String icao;
+    final String name;
+    final String state;
+    final Status status;
+    final Weather weather;
+
+    TopLevel({
+        required this.city,
+        required this.delay,
+        required this.iata,
+        required this.icao,
+        required this.name,
+        required this.state,
+        required this.status,
+        required this.weather,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        city: json["city"],
+        delay: json["delay"],
+        iata: json["IATA"],
+        icao: json["ICAO"],
+        name: json["name"],
+        state: json["state"],
+        status: Status.fromJson(json["status"]),
+        weather: Weather.fromJson(json["weather"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "delay": delay,
+        "IATA": iata,
+        "ICAO": icao,
+        "name": name,
+        "state": state,
+        "status": status.toJson(),
+        "weather": weather.toJson(),
+    };
+}
+
+class Status {
+    final String avgDelay;
+    final String closureBegin;
+    final String closureEnd;
+    final String endTime;
+    final String maxDelay;
+    final String minDelay;
+    final String reason;
+    final String trend;
+    final String type;
+
+    Status({
+        required this.avgDelay,
+        required this.closureBegin,
+        required this.closureEnd,
+        required this.endTime,
+        required this.maxDelay,
+        required this.minDelay,
+        required this.reason,
+        required this.trend,
+        required this.type,
+    });
+
+    factory Status.fromJson(Map<String, dynamic> json) => Status(
+        avgDelay: json["avgDelay"],
+        closureBegin: json["closureBegin"],
+        closureEnd: json["closureEnd"],
+        endTime: json["endTime"],
+        maxDelay: json["maxDelay"],
+        minDelay: json["minDelay"],
+        reason: json["reason"],
+        trend: json["trend"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avgDelay": avgDelay,
+        "closureBegin": closureBegin,
+        "closureEnd": closureEnd,
+        "endTime": endTime,
+        "maxDelay": maxDelay,
+        "minDelay": minDelay,
+        "reason": reason,
+        "trend": trend,
+        "type": type,
+    };
+}
+
+class Weather {
+    final Meta meta;
+    final String temp;
+    final double visibility;
+    final String weather;
+    final String wind;
+
+    Weather({
+        required this.meta,
+        required this.temp,
+        required this.visibility,
+        required this.weather,
+        required this.wind,
+    });
+
+    factory Weather.fromJson(Map<String, dynamic> json) => Weather(
+        meta: Meta.fromJson(json["meta"]),
+        temp: json["temp"],
+        visibility: json["visibility"]?.toDouble(),
+        weather: json["weather"],
+        wind: json["wind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "meta": meta.toJson(),
+        "temp": temp,
+        "visibility": visibility,
+        "weather": weather,
+        "wind": wind,
+    };
+}
+
+class Meta {
+    final String credit;
+    final String updated;
+    final String url;
+
+    Meta({
+        required this.credit,
+        required this.updated,
+        required this.url,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        credit: json["credit"],
+        updated: json["updated"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "credit": credit,
+        "updated": updated,
+        "url": url,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/cda6c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cda6c.json/default/TopLevel.dart
new file mode 100644
index 0000000..ebcc51a
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cda6c.json/default/TopLevel.dart
@@ -0,0 +1,121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<dynamic> topLevelFromJson(String str) => List<dynamic>.from(json.decode(str).map((x) => x));
+
+String topLevelToJson(List<dynamic> data) => json.encode(List<dynamic>.from(data.map((x) => x)));
+
+class TopLevelElement {
+    final Country country;
+    final String date;
+    final String decimal;
+    final Country indicator;
+    final String value;
+
+    TopLevelElement({
+        required this.country,
+        required this.date,
+        required this.decimal,
+        required this.indicator,
+        required this.value,
+    });
+
+    factory TopLevelElement.fromJson(Map<String, dynamic> json) => TopLevelElement(
+        country: Country.fromJson(json["country"]),
+        date: json["date"],
+        decimal: json["decimal"],
+        indicator: Country.fromJson(json["indicator"]),
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "country": country.toJson(),
+        "date": date,
+        "decimal": decimal,
+        "indicator": indicator.toJson(),
+        "value": value,
+    };
+}
+
+class Country {
+    final Id id;
+    final Value value;
+
+    Country({
+        required this.id,
+        required this.value,
+    });
+
+    factory Country.fromJson(Map<String, dynamic> json) => Country(
+        id: idValues.map[json["id"]]!,
+        value: valueValues.map[json["value"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": idValues.reverse[id],
+        "value": valueValues.reverse[value],
+    };
+}
+
+enum Id {
+    CN,
+    SP_POP_TOTL
+}
+
+final idValues = EnumValues({
+    "CN": Id.CN,
+    "SP.POP.TOTL": Id.SP_POP_TOTL
+});
+
+enum Value {
+    CHINA,
+    POPULATION_TOTAL
+}
+
+final valueValues = EnumValues({
+    "China": Value.CHINA,
+    "Population, total": Value.POPULATION_TOTAL
+});
+
+class PurpleTopLevel {
+    final int page;
+    final int pages;
+    final String perPage;
+    final int total;
+
+    PurpleTopLevel({
+        required this.page,
+        required this.pages,
+        required this.perPage,
+        required this.total,
+    });
+
+    factory PurpleTopLevel.fromJson(Map<String, dynamic> json) => PurpleTopLevel(
+        page: json["page"],
+        pages: json["pages"],
+        perPage: json["per_page"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "page": page,
+        "pages": pages,
+        "per_page": perPage,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart
new file mode 100644
index 0000000..53de3be
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart
@@ -0,0 +1,33 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String base;
+    final DateTime date;
+    final Map<String, double> rates;
+
+    TopLevel({
+        required this.base,
+        required this.date,
+        required this.rates,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        base: json["base"],
+        date: DateTime.parse(json["date"]),
+        rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base": base,
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart
new file mode 100644
index 0000000..2997551
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<TotalPopulation> totalPopulation;
+
+    TopLevel({
+        required this.totalPopulation,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        totalPopulation: List<TotalPopulation>.from(json["total_population"].map((x) => TotalPopulation.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "total_population": List<dynamic>.from(totalPopulation.map((x) => x.toJson())),
+    };
+}
+
+class TotalPopulation {
+    final DateTime date;
+    final int population;
+
+    TotalPopulation({
+        required this.date,
+        required this.population,
+    });
+
+    factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
+        date: DateTime.parse(json["date"]),
+        population: json["population"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "population": population,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart
new file mode 100644
index 0000000..d631ace
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart
@@ -0,0 +1,95 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int count;
+    final Facets facets;
+    final int limit;
+    final String next;
+    final int offset;
+    final bool previous;
+    final List<Result> results;
+
+    TopLevel({
+        required this.count,
+        required this.facets,
+        required this.limit,
+        required this.next,
+        required this.offset,
+        required this.previous,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        count: json["count"],
+        facets: Facets.fromJson(json["facets"]),
+        limit: json["limit"],
+        next: json["next"],
+        offset: json["offset"],
+        previous: json["previous"],
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "facets": facets.toJson(),
+        "limit": limit,
+        "next": next,
+        "offset": offset,
+        "previous": previous,
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Facets {
+    Facets();
+
+    factory Facets.fromJson(Map<String, dynamic> json) => Facets(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Result {
+    final String? acronym;
+    final DateTime createdAt;
+    final String id;
+    final String name;
+    final DateTime updatedAt;
+    final String uri;
+
+    Result({
+        required this.acronym,
+        required this.createdAt,
+        required this.id,
+        required this.name,
+        required this.updatedAt,
+        required this.uri,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        acronym: json["acronym"],
+        createdAt: DateTime.parse(json["created_at"]),
+        id: json["id"],
+        name: json["name"],
+        updatedAt: DateTime.parse(json["updated_at"]),
+        uri: json["uri"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "acronym": acronym,
+        "created_at": createdAt.toIso8601String(),
+        "id": id,
+        "name": name,
+        "updated_at": updatedAt.toIso8601String(),
+        "uri": uri,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart
new file mode 100644
index 0000000..157027f
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart
@@ -0,0 +1,439 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final Text text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": textValues.reverse[text],
+    };
+}
+
+enum Text {
+    MOSTLY_SUNNY,
+    SUNNY
+}
+
+final textValues = EnumValues({
+    "Mostly Sunny": Text.MOSTLY_SUNNY,
+    "Sunny": Text.SUNNY
+});
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final Text text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": textValues.reverse[text],
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart
new file mode 100644
index 0000000..d67ad5c
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart
@@ -0,0 +1,407 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Booster> booster;
+    final String border;
+    final List<Card> cards;
+    final String code;
+    final String gathererCode;
+    final String magicCardsInfoCode;
+    final int mkmId;
+    final String mkmName;
+    final String name;
+    final DateTime releaseDate;
+    final String type;
+
+    TopLevel({
+        required this.booster,
+        required this.border,
+        required this.cards,
+        required this.code,
+        required this.gathererCode,
+        required this.magicCardsInfoCode,
+        required this.mkmId,
+        required this.mkmName,
+        required this.name,
+        required this.releaseDate,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        booster: List<Booster>.from(json["booster"].map((x) => boosterValues.map[x]!)),
+        border: json["border"],
+        cards: List<Card>.from(json["cards"].map((x) => Card.fromJson(x))),
+        code: json["code"],
+        gathererCode: json["gathererCode"],
+        magicCardsInfoCode: json["magicCardsInfoCode"],
+        mkmId: json["mkm_id"],
+        mkmName: json["mkm_name"],
+        name: json["name"],
+        releaseDate: DateTime.parse(json["releaseDate"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "booster": List<dynamic>.from(booster.map((x) => boosterValues.reverse[x])),
+        "border": border,
+        "cards": List<dynamic>.from(cards.map((x) => x.toJson())),
+        "code": code,
+        "gathererCode": gathererCode,
+        "magicCardsInfoCode": magicCardsInfoCode,
+        "mkm_id": mkmId,
+        "mkm_name": mkmName,
+        "name": name,
+        "releaseDate": "${releaseDate.year.toString().padLeft(4, '0')}-${releaseDate.month.toString().padLeft(2, '0')}-${releaseDate.day.toString().padLeft(2, '0')}",
+        "type": type,
+    };
+}
+
+enum Booster {
+    RARE,
+    UNCOMMON,
+    COMMON
+}
+
+final boosterValues = EnumValues({
+    "rare": Booster.RARE,
+    "uncommon": Booster.UNCOMMON,
+    "common": Booster.COMMON
+});
+
+class Card {
+    final String artist;
+    final int cmc;
+    final List<ColorIdentity>? colorIdentity;
+    final List<Color>? colors;
+    final String? flavor;
+    final String id;
+    final String imageName;
+    final Layout layout;
+    final List<LegalityElement> legalities;
+    final String? manaCost;
+    final String? mciNumber;
+    final int multiverseid;
+    final String name;
+    final String? originalText;
+    final String originalType;
+    final String? power;
+    final List<String> printings;
+    final Rarity rarity;
+    final bool? reserved;
+    final List<Ruling>? rulings;
+    final List<String>? subtypes;
+    final List<Supertype>? supertypes;
+    final String? text;
+    final String? toughness;
+    final String type;
+    final List<Type> types;
+    final List<int>? variations;
+
+    Card({
+        required this.artist,
+        required this.cmc,
+        this.colorIdentity,
+        this.colors,
+        this.flavor,
+        required this.id,
+        required this.imageName,
+        required this.layout,
+        required this.legalities,
+        this.manaCost,
+        this.mciNumber,
+        required this.multiverseid,
+        required this.name,
+        this.originalText,
+        required this.originalType,
+        this.power,
+        required this.printings,
+        required this.rarity,
+        this.reserved,
+        this.rulings,
+        this.subtypes,
+        this.supertypes,
+        this.text,
+        this.toughness,
+        required this.type,
+        required this.types,
+        this.variations,
+    });
+
+    factory Card.fromJson(Map<String, dynamic> json) => Card(
+        artist: json["artist"],
+        cmc: json["cmc"],
+        colorIdentity: json["colorIdentity"] == null ? null : List<ColorIdentity>.from(json["colorIdentity"]!.map((x) => colorIdentityValues.map[x]!)),
+        colors: json["colors"] == null ? null : List<Color>.from(json["colors"]!.map((x) => colorValues.map[x]!)),
+        flavor: json["flavor"],
+        id: json["id"],
+        imageName: json["imageName"],
+        layout: layoutValues.map[json["layout"]]!,
+        legalities: List<LegalityElement>.from(json["legalities"].map((x) => LegalityElement.fromJson(x))),
+        manaCost: json["manaCost"],
+        mciNumber: json["mciNumber"],
+        multiverseid: json["multiverseid"],
+        name: json["name"],
+        originalText: json["originalText"],
+        originalType: json["originalType"],
+        power: json["power"],
+        printings: List<String>.from(json["printings"].map((x) => x)),
+        rarity: rarityValues.map[json["rarity"]]!,
+        reserved: json["reserved"],
+        rulings: json["rulings"] == null ? null : List<Ruling>.from(json["rulings"]!.map((x) => Ruling.fromJson(x))),
+        subtypes: json["subtypes"] == null ? null : List<String>.from(json["subtypes"]!.map((x) => x)),
+        supertypes: json["supertypes"] == null ? null : List<Supertype>.from(json["supertypes"]!.map((x) => supertypeValues.map[x]!)),
+        text: json["text"],
+        toughness: json["toughness"],
+        type: json["type"],
+        types: List<Type>.from(json["types"].map((x) => typeValues.map[x]!)),
+        variations: json["variations"] == null ? null : List<int>.from(json["variations"]!.map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "artist": artist,
+        "cmc": cmc,
+        "colorIdentity": colorIdentity == null ? null : List<dynamic>.from(colorIdentity!.map((x) => colorIdentityValues.reverse[x])),
+        "colors": colors == null ? null : List<dynamic>.from(colors!.map((x) => colorValues.reverse[x])),
+        "flavor": flavor,
+        "id": id,
+        "imageName": imageName,
+        "layout": layoutValues.reverse[layout],
+        "legalities": List<dynamic>.from(legalities.map((x) => x.toJson())),
+        "manaCost": manaCost,
+        "mciNumber": mciNumber,
+        "multiverseid": multiverseid,
+        "name": name,
+        "originalText": originalText,
+        "originalType": originalType,
+        "power": power,
+        "printings": List<dynamic>.from(printings.map((x) => x)),
+        "rarity": rarityValues.reverse[rarity],
+        "reserved": reserved,
+        "rulings": rulings == null ? null : List<dynamic>.from(rulings!.map((x) => x.toJson())),
+        "subtypes": subtypes == null ? null : List<dynamic>.from(subtypes!.map((x) => x)),
+        "supertypes": supertypes == null ? null : List<dynamic>.from(supertypes!.map((x) => supertypeValues.reverse[x])),
+        "text": text,
+        "toughness": toughness,
+        "type": type,
+        "types": List<dynamic>.from(types.map((x) => typeValues.reverse[x])),
+        "variations": variations == null ? null : List<dynamic>.from(variations!.map((x) => x)),
+    };
+}
+
+enum ColorIdentity {
+    U,
+    B,
+    W,
+    G,
+    R
+}
+
+final colorIdentityValues = EnumValues({
+    "U": ColorIdentity.U,
+    "B": ColorIdentity.B,
+    "W": ColorIdentity.W,
+    "G": ColorIdentity.G,
+    "R": ColorIdentity.R
+});
+
+enum Color {
+    BLUE,
+    BLACK,
+    WHITE,
+    GREEN,
+    RED
+}
+
+final colorValues = EnumValues({
+    "Blue": Color.BLUE,
+    "Black": Color.BLACK,
+    "White": Color.WHITE,
+    "Green": Color.GREEN,
+    "Red": Color.RED
+});
+
+enum Layout {
+    NORMAL
+}
+
+final layoutValues = EnumValues({
+    "normal": Layout.NORMAL
+});
+
+class LegalityElement {
+    final Format format;
+    final LegalityEnum legality;
+
+    LegalityElement({
+        required this.format,
+        required this.legality,
+    });
+
+    factory LegalityElement.fromJson(Map<String, dynamic> json) => LegalityElement(
+        format: formatValues.map[json["format"]]!,
+        legality: legalityEnumValues.map[json["legality"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "format": formatValues.reverse[format],
+        "legality": legalityEnumValues.reverse[legality],
+    };
+}
+
+enum Format {
+    COMMANDER,
+    LEGACY,
+    MODERN,
+    VINTAGE,
+    TIME_SPIRAL_BLOCK,
+    RAVNICA_BLOCK,
+    ICE_AGE_BLOCK,
+    TEMPEST_BLOCK,
+    ONSLAUGHT_BLOCK,
+    MASQUES_BLOCK,
+    MIRAGE_BLOCK,
+    URZA_BLOCK,
+    SCARS_OF_MIRRODIN_BLOCK,
+    MIRRODIN_BLOCK,
+    AMONKHET_BLOCK,
+    BATTLE_FOR_ZENDIKAR_BLOCK,
+    INNISTRAD_BLOCK,
+    INVASION_BLOCK,
+    KALADESH_BLOCK,
+    KAMIGAWA_BLOCK,
+    KHANS_OF_TARKIR_BLOCK,
+    LORWYN_SHADOWMOOR_BLOCK,
+    ODYSSEY_BLOCK,
+    RETURN_TO_RAVNICA_BLOCK,
+    SHADOWS_OVER_INNISTRAD_BLOCK,
+    SHARDS_OF_ALARA_BLOCK,
+    STANDARD,
+    THEROS_BLOCK,
+    UN_SETS,
+    ZENDIKAR_BLOCK
+}
+
+final formatValues = EnumValues({
+    "Commander": Format.COMMANDER,
+    "Legacy": Format.LEGACY,
+    "Modern": Format.MODERN,
+    "Vintage": Format.VINTAGE,
+    "Time Spiral Block": Format.TIME_SPIRAL_BLOCK,
+    "Ravnica Block": Format.RAVNICA_BLOCK,
+    "Ice Age Block": Format.ICE_AGE_BLOCK,
+    "Tempest Block": Format.TEMPEST_BLOCK,
+    "Onslaught Block": Format.ONSLAUGHT_BLOCK,
+    "Masques Block": Format.MASQUES_BLOCK,
+    "Mirage Block": Format.MIRAGE_BLOCK,
+    "Urza Block": Format.URZA_BLOCK,
+    "Scars of Mirrodin Block": Format.SCARS_OF_MIRRODIN_BLOCK,
+    "Mirrodin Block": Format.MIRRODIN_BLOCK,
+    "Amonkhet Block": Format.AMONKHET_BLOCK,
+    "Battle for Zendikar Block": Format.BATTLE_FOR_ZENDIKAR_BLOCK,
+    "Innistrad Block": Format.INNISTRAD_BLOCK,
+    "Invasion Block": Format.INVASION_BLOCK,
+    "Kaladesh Block": Format.KALADESH_BLOCK,
+    "Kamigawa Block": Format.KAMIGAWA_BLOCK,
+    "Khans of Tarkir Block": Format.KHANS_OF_TARKIR_BLOCK,
+    "Lorwyn-Shadowmoor Block": Format.LORWYN_SHADOWMOOR_BLOCK,
+    "Odyssey Block": Format.ODYSSEY_BLOCK,
+    "Return to Ravnica Block": Format.RETURN_TO_RAVNICA_BLOCK,
+    "Shadows over Innistrad Block": Format.SHADOWS_OVER_INNISTRAD_BLOCK,
+    "Shards of Alara Block": Format.SHARDS_OF_ALARA_BLOCK,
+    "Standard": Format.STANDARD,
+    "Theros Block": Format.THEROS_BLOCK,
+    "Un-Sets": Format.UN_SETS,
+    "Zendikar Block": Format.ZENDIKAR_BLOCK
+});
+
+enum LegalityEnum {
+    LEGAL,
+    BANNED,
+    RESTRICTED
+}
+
+final legalityEnumValues = EnumValues({
+    "Legal": LegalityEnum.LEGAL,
+    "Banned": LegalityEnum.BANNED,
+    "Restricted": LegalityEnum.RESTRICTED
+});
+
+enum Rarity {
+    UNCOMMON,
+    RARE,
+    COMMON,
+    BASIC_LAND
+}
+
+final rarityValues = EnumValues({
+    "Uncommon": Rarity.UNCOMMON,
+    "Rare": Rarity.RARE,
+    "Common": Rarity.COMMON,
+    "Basic Land": Rarity.BASIC_LAND
+});
+
+class Ruling {
+    final DateTime date;
+    final String text;
+
+    Ruling({
+        required this.date,
+        required this.text,
+    });
+
+    factory Ruling.fromJson(Map<String, dynamic> json) => Ruling(
+        date: DateTime.parse(json["date"]),
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "text": text,
+    };
+}
+
+enum Supertype {
+    BASIC
+}
+
+final supertypeValues = EnumValues({
+    "Basic": Supertype.BASIC
+});
+
+enum Type {
+    CREATURE,
+    INSTANT,
+    ENCHANTMENT,
+    ARTIFACT,
+    SORCERY,
+    LAND
+}
+
+final typeValues = EnumValues({
+    "Creature": Type.CREATURE,
+    "Instant": Type.INSTANT,
+    "Enchantment": Type.ENCHANTMENT,
+    "Artifact": Type.ARTIFACT,
+    "Sorcery": Type.SORCERY,
+    "Land": Type.LAND
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart
new file mode 100644
index 0000000..d67ad5c
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart
@@ -0,0 +1,407 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Booster> booster;
+    final String border;
+    final List<Card> cards;
+    final String code;
+    final String gathererCode;
+    final String magicCardsInfoCode;
+    final int mkmId;
+    final String mkmName;
+    final String name;
+    final DateTime releaseDate;
+    final String type;
+
+    TopLevel({
+        required this.booster,
+        required this.border,
+        required this.cards,
+        required this.code,
+        required this.gathererCode,
+        required this.magicCardsInfoCode,
+        required this.mkmId,
+        required this.mkmName,
+        required this.name,
+        required this.releaseDate,
+        required this.type,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        booster: List<Booster>.from(json["booster"].map((x) => boosterValues.map[x]!)),
+        border: json["border"],
+        cards: List<Card>.from(json["cards"].map((x) => Card.fromJson(x))),
+        code: json["code"],
+        gathererCode: json["gathererCode"],
+        magicCardsInfoCode: json["magicCardsInfoCode"],
+        mkmId: json["mkm_id"],
+        mkmName: json["mkm_name"],
+        name: json["name"],
+        releaseDate: DateTime.parse(json["releaseDate"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "booster": List<dynamic>.from(booster.map((x) => boosterValues.reverse[x])),
+        "border": border,
+        "cards": List<dynamic>.from(cards.map((x) => x.toJson())),
+        "code": code,
+        "gathererCode": gathererCode,
+        "magicCardsInfoCode": magicCardsInfoCode,
+        "mkm_id": mkmId,
+        "mkm_name": mkmName,
+        "name": name,
+        "releaseDate": "${releaseDate.year.toString().padLeft(4, '0')}-${releaseDate.month.toString().padLeft(2, '0')}-${releaseDate.day.toString().padLeft(2, '0')}",
+        "type": type,
+    };
+}
+
+enum Booster {
+    RARE,
+    UNCOMMON,
+    COMMON
+}
+
+final boosterValues = EnumValues({
+    "rare": Booster.RARE,
+    "uncommon": Booster.UNCOMMON,
+    "common": Booster.COMMON
+});
+
+class Card {
+    final String artist;
+    final int cmc;
+    final List<ColorIdentity>? colorIdentity;
+    final List<Color>? colors;
+    final String? flavor;
+    final String id;
+    final String imageName;
+    final Layout layout;
+    final List<LegalityElement> legalities;
+    final String? manaCost;
+    final String? mciNumber;
+    final int multiverseid;
+    final String name;
+    final String? originalText;
+    final String originalType;
+    final String? power;
+    final List<String> printings;
+    final Rarity rarity;
+    final bool? reserved;
+    final List<Ruling>? rulings;
+    final List<String>? subtypes;
+    final List<Supertype>? supertypes;
+    final String? text;
+    final String? toughness;
+    final String type;
+    final List<Type> types;
+    final List<int>? variations;
+
+    Card({
+        required this.artist,
+        required this.cmc,
+        this.colorIdentity,
+        this.colors,
+        this.flavor,
+        required this.id,
+        required this.imageName,
+        required this.layout,
+        required this.legalities,
+        this.manaCost,
+        this.mciNumber,
+        required this.multiverseid,
+        required this.name,
+        this.originalText,
+        required this.originalType,
+        this.power,
+        required this.printings,
+        required this.rarity,
+        this.reserved,
+        this.rulings,
+        this.subtypes,
+        this.supertypes,
+        this.text,
+        this.toughness,
+        required this.type,
+        required this.types,
+        this.variations,
+    });
+
+    factory Card.fromJson(Map<String, dynamic> json) => Card(
+        artist: json["artist"],
+        cmc: json["cmc"],
+        colorIdentity: json["colorIdentity"] == null ? null : List<ColorIdentity>.from(json["colorIdentity"]!.map((x) => colorIdentityValues.map[x]!)),
+        colors: json["colors"] == null ? null : List<Color>.from(json["colors"]!.map((x) => colorValues.map[x]!)),
+        flavor: json["flavor"],
+        id: json["id"],
+        imageName: json["imageName"],
+        layout: layoutValues.map[json["layout"]]!,
+        legalities: List<LegalityElement>.from(json["legalities"].map((x) => LegalityElement.fromJson(x))),
+        manaCost: json["manaCost"],
+        mciNumber: json["mciNumber"],
+        multiverseid: json["multiverseid"],
+        name: json["name"],
+        originalText: json["originalText"],
+        originalType: json["originalType"],
+        power: json["power"],
+        printings: List<String>.from(json["printings"].map((x) => x)),
+        rarity: rarityValues.map[json["rarity"]]!,
+        reserved: json["reserved"],
+        rulings: json["rulings"] == null ? null : List<Ruling>.from(json["rulings"]!.map((x) => Ruling.fromJson(x))),
+        subtypes: json["subtypes"] == null ? null : List<String>.from(json["subtypes"]!.map((x) => x)),
+        supertypes: json["supertypes"] == null ? null : List<Supertype>.from(json["supertypes"]!.map((x) => supertypeValues.map[x]!)),
+        text: json["text"],
+        toughness: json["toughness"],
+        type: json["type"],
+        types: List<Type>.from(json["types"].map((x) => typeValues.map[x]!)),
+        variations: json["variations"] == null ? null : List<int>.from(json["variations"]!.map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "artist": artist,
+        "cmc": cmc,
+        "colorIdentity": colorIdentity == null ? null : List<dynamic>.from(colorIdentity!.map((x) => colorIdentityValues.reverse[x])),
+        "colors": colors == null ? null : List<dynamic>.from(colors!.map((x) => colorValues.reverse[x])),
+        "flavor": flavor,
+        "id": id,
+        "imageName": imageName,
+        "layout": layoutValues.reverse[layout],
+        "legalities": List<dynamic>.from(legalities.map((x) => x.toJson())),
+        "manaCost": manaCost,
+        "mciNumber": mciNumber,
+        "multiverseid": multiverseid,
+        "name": name,
+        "originalText": originalText,
+        "originalType": originalType,
+        "power": power,
+        "printings": List<dynamic>.from(printings.map((x) => x)),
+        "rarity": rarityValues.reverse[rarity],
+        "reserved": reserved,
+        "rulings": rulings == null ? null : List<dynamic>.from(rulings!.map((x) => x.toJson())),
+        "subtypes": subtypes == null ? null : List<dynamic>.from(subtypes!.map((x) => x)),
+        "supertypes": supertypes == null ? null : List<dynamic>.from(supertypes!.map((x) => supertypeValues.reverse[x])),
+        "text": text,
+        "toughness": toughness,
+        "type": type,
+        "types": List<dynamic>.from(types.map((x) => typeValues.reverse[x])),
+        "variations": variations == null ? null : List<dynamic>.from(variations!.map((x) => x)),
+    };
+}
+
+enum ColorIdentity {
+    U,
+    B,
+    W,
+    G,
+    R
+}
+
+final colorIdentityValues = EnumValues({
+    "U": ColorIdentity.U,
+    "B": ColorIdentity.B,
+    "W": ColorIdentity.W,
+    "G": ColorIdentity.G,
+    "R": ColorIdentity.R
+});
+
+enum Color {
+    BLUE,
+    BLACK,
+    WHITE,
+    GREEN,
+    RED
+}
+
+final colorValues = EnumValues({
+    "Blue": Color.BLUE,
+    "Black": Color.BLACK,
+    "White": Color.WHITE,
+    "Green": Color.GREEN,
+    "Red": Color.RED
+});
+
+enum Layout {
+    NORMAL
+}
+
+final layoutValues = EnumValues({
+    "normal": Layout.NORMAL
+});
+
+class LegalityElement {
+    final Format format;
+    final LegalityEnum legality;
+
+    LegalityElement({
+        required this.format,
+        required this.legality,
+    });
+
+    factory LegalityElement.fromJson(Map<String, dynamic> json) => LegalityElement(
+        format: formatValues.map[json["format"]]!,
+        legality: legalityEnumValues.map[json["legality"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "format": formatValues.reverse[format],
+        "legality": legalityEnumValues.reverse[legality],
+    };
+}
+
+enum Format {
+    COMMANDER,
+    LEGACY,
+    MODERN,
+    VINTAGE,
+    TIME_SPIRAL_BLOCK,
+    RAVNICA_BLOCK,
+    ICE_AGE_BLOCK,
+    TEMPEST_BLOCK,
+    ONSLAUGHT_BLOCK,
+    MASQUES_BLOCK,
+    MIRAGE_BLOCK,
+    URZA_BLOCK,
+    SCARS_OF_MIRRODIN_BLOCK,
+    MIRRODIN_BLOCK,
+    AMONKHET_BLOCK,
+    BATTLE_FOR_ZENDIKAR_BLOCK,
+    INNISTRAD_BLOCK,
+    INVASION_BLOCK,
+    KALADESH_BLOCK,
+    KAMIGAWA_BLOCK,
+    KHANS_OF_TARKIR_BLOCK,
+    LORWYN_SHADOWMOOR_BLOCK,
+    ODYSSEY_BLOCK,
+    RETURN_TO_RAVNICA_BLOCK,
+    SHADOWS_OVER_INNISTRAD_BLOCK,
+    SHARDS_OF_ALARA_BLOCK,
+    STANDARD,
+    THEROS_BLOCK,
+    UN_SETS,
+    ZENDIKAR_BLOCK
+}
+
+final formatValues = EnumValues({
+    "Commander": Format.COMMANDER,
+    "Legacy": Format.LEGACY,
+    "Modern": Format.MODERN,
+    "Vintage": Format.VINTAGE,
+    "Time Spiral Block": Format.TIME_SPIRAL_BLOCK,
+    "Ravnica Block": Format.RAVNICA_BLOCK,
+    "Ice Age Block": Format.ICE_AGE_BLOCK,
+    "Tempest Block": Format.TEMPEST_BLOCK,
+    "Onslaught Block": Format.ONSLAUGHT_BLOCK,
+    "Masques Block": Format.MASQUES_BLOCK,
+    "Mirage Block": Format.MIRAGE_BLOCK,
+    "Urza Block": Format.URZA_BLOCK,
+    "Scars of Mirrodin Block": Format.SCARS_OF_MIRRODIN_BLOCK,
+    "Mirrodin Block": Format.MIRRODIN_BLOCK,
+    "Amonkhet Block": Format.AMONKHET_BLOCK,
+    "Battle for Zendikar Block": Format.BATTLE_FOR_ZENDIKAR_BLOCK,
+    "Innistrad Block": Format.INNISTRAD_BLOCK,
+    "Invasion Block": Format.INVASION_BLOCK,
+    "Kaladesh Block": Format.KALADESH_BLOCK,
+    "Kamigawa Block": Format.KAMIGAWA_BLOCK,
+    "Khans of Tarkir Block": Format.KHANS_OF_TARKIR_BLOCK,
+    "Lorwyn-Shadowmoor Block": Format.LORWYN_SHADOWMOOR_BLOCK,
+    "Odyssey Block": Format.ODYSSEY_BLOCK,
+    "Return to Ravnica Block": Format.RETURN_TO_RAVNICA_BLOCK,
+    "Shadows over Innistrad Block": Format.SHADOWS_OVER_INNISTRAD_BLOCK,
+    "Shards of Alara Block": Format.SHARDS_OF_ALARA_BLOCK,
+    "Standard": Format.STANDARD,
+    "Theros Block": Format.THEROS_BLOCK,
+    "Un-Sets": Format.UN_SETS,
+    "Zendikar Block": Format.ZENDIKAR_BLOCK
+});
+
+enum LegalityEnum {
+    LEGAL,
+    BANNED,
+    RESTRICTED
+}
+
+final legalityEnumValues = EnumValues({
+    "Legal": LegalityEnum.LEGAL,
+    "Banned": LegalityEnum.BANNED,
+    "Restricted": LegalityEnum.RESTRICTED
+});
+
+enum Rarity {
+    UNCOMMON,
+    RARE,
+    COMMON,
+    BASIC_LAND
+}
+
+final rarityValues = EnumValues({
+    "Uncommon": Rarity.UNCOMMON,
+    "Rare": Rarity.RARE,
+    "Common": Rarity.COMMON,
+    "Basic Land": Rarity.BASIC_LAND
+});
+
+class Ruling {
+    final DateTime date;
+    final String text;
+
+    Ruling({
+        required this.date,
+        required this.text,
+    });
+
+    factory Ruling.fromJson(Map<String, dynamic> json) => Ruling(
+        date: DateTime.parse(json["date"]),
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": "${date.year.toString().padLeft(4, '0')}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}",
+        "text": text,
+    };
+}
+
+enum Supertype {
+    BASIC
+}
+
+final supertypeValues = EnumValues({
+    "Basic": Supertype.BASIC
+});
+
+enum Type {
+    CREATURE,
+    INSTANT,
+    ENCHANTMENT,
+    ARTIFACT,
+    SORCERY,
+    LAND
+}
+
+final typeValues = EnumValues({
+    "Creature": Type.CREATURE,
+    "Instant": Type.INSTANT,
+    "Enchantment": Type.ENCHANTMENT,
+    "Artifact": Type.ARTIFACT,
+    "Sorcery": Type.SORCERY,
+    "Land": Type.LAND
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/dec3a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dec3a.json/default/TopLevel.dart
new file mode 100644
index 0000000..f2b513b
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/dec3a.json/default/TopLevel.dart
@@ -0,0 +1,269 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Metadata metadata;
+    final List<Result> results;
+
+    TopLevel({
+        required this.metadata,
+        required this.results,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        metadata: Metadata.fromJson(json["metadata"]),
+        results: List<Result>.from(json["results"].map((x) => Result.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "metadata": metadata.toJson(),
+        "results": List<dynamic>.from(results.map((x) => x.toJson())),
+    };
+}
+
+class Metadata {
+    final double executionTime;
+    final ResponseInfo responseInfo;
+    final Resultset resultset;
+
+    Metadata({
+        required this.executionTime,
+        required this.responseInfo,
+        required this.resultset,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        executionTime: json["executionTime"]?.toDouble(),
+        responseInfo: ResponseInfo.fromJson(json["responseInfo"]),
+        resultset: Resultset.fromJson(json["resultset"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "executionTime": executionTime,
+        "responseInfo": responseInfo.toJson(),
+        "resultset": resultset.toJson(),
+    };
+}
+
+class ResponseInfo {
+    final String developerMessage;
+    final int status;
+
+    ResponseInfo({
+        required this.developerMessage,
+        required this.status,
+    });
+
+    factory ResponseInfo.fromJson(Map<String, dynamic> json) => ResponseInfo(
+        developerMessage: json["developerMessage"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "developerMessage": developerMessage,
+        "status": status,
+    };
+}
+
+class Resultset {
+    final int count;
+    final int page;
+    final int pagesize;
+
+    Resultset({
+        required this.count,
+        required this.page,
+        required this.pagesize,
+    });
+
+    factory Resultset.fromJson(Map<String, dynamic> json) => Resultset(
+        count: json["count"],
+        page: json["page"],
+        pagesize: json["pagesize"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "page": page,
+        "pagesize": pagesize,
+    };
+}
+
+class Result {
+    final String aboutOffice;
+    final String applicationProcess;
+    final String body;
+    final String changed;
+    final String created;
+    final dynamic deadline;
+    final dynamic hiringOffice;
+    final HiringOrg hiringOrg;
+    final dynamic jobId;
+    final String language;
+    final Location location;
+    final String numPositions;
+    final String position;
+    final String practiceArea;
+    final String qualifications;
+    final dynamic relocationExpenses;
+    final String salary;
+    final String title;
+    final String travel;
+    final String url;
+    final String uuid;
+    final String vuuid;
+
+    Result({
+        required this.aboutOffice,
+        required this.applicationProcess,
+        required this.body,
+        required this.changed,
+        required this.created,
+        required this.deadline,
+        required this.hiringOffice,
+        required this.hiringOrg,
+        required this.jobId,
+        required this.language,
+        required this.location,
+        required this.numPositions,
+        required this.position,
+        required this.practiceArea,
+        required this.qualifications,
+        required this.relocationExpenses,
+        required this.salary,
+        required this.title,
+        required this.travel,
+        required this.url,
+        required this.uuid,
+        required this.vuuid,
+    });
+
+    factory Result.fromJson(Map<String, dynamic> json) => Result(
+        aboutOffice: json["about_office"],
+        applicationProcess: json["application_process"],
+        body: json["body"],
+        changed: json["changed"],
+        created: json["created"],
+        deadline: json["deadline"],
+        hiringOffice: json["hiring_office"],
+        hiringOrg: HiringOrg.fromJson(json["hiring_org"]),
+        jobId: json["job_id"],
+        language: json["language"],
+        location: Location.fromJson(json["location"]),
+        numPositions: json["num_positions"],
+        position: json["position"],
+        practiceArea: json["practice_area"],
+        qualifications: json["qualifications"],
+        relocationExpenses: json["relocation_expenses"],
+        salary: json["salary"],
+        title: json["title"],
+        travel: json["travel"],
+        url: json["url"],
+        uuid: json["uuid"],
+        vuuid: json["vuuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "about_office": aboutOffice,
+        "application_process": applicationProcess,
+        "body": body,
+        "changed": changed,
+        "created": created,
+        "deadline": deadline,
+        "hiring_office": hiringOffice,
+        "hiring_org": hiringOrg.toJson(),
+        "job_id": jobId,
+        "language": language,
+        "location": location.toJson(),
+        "num_positions": numPositions,
+        "position": position,
+        "practice_area": practiceArea,
+        "qualifications": qualifications,
+        "relocation_expenses": relocationExpenses,
+        "salary": salary,
+        "title": title,
+        "travel": travel,
+        "url": url,
+        "uuid": uuid,
+        "vuuid": vuuid,
+    };
+}
+
+class HiringOrg {
+    final String name;
+    final String uuid;
+
+    HiringOrg({
+        required this.name,
+        required this.uuid,
+    });
+
+    factory HiringOrg.fromJson(Map<String, dynamic> json) => HiringOrg(
+        name: json["name"],
+        uuid: json["uuid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+        "uuid": uuid,
+    };
+}
+
+class Location {
+    final String administrativeArea;
+    final String country;
+    final String faxNumber;
+    final String locality;
+    final String mobileNumber;
+    final String phoneNumber;
+    final String phoneNumberExtension;
+    final String postalCode;
+    final dynamic subPremise;
+    final String thoroughfare;
+
+    Location({
+        required this.administrativeArea,
+        required this.country,
+        required this.faxNumber,
+        required this.locality,
+        required this.mobileNumber,
+        required this.phoneNumber,
+        required this.phoneNumberExtension,
+        required this.postalCode,
+        required this.subPremise,
+        required this.thoroughfare,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        administrativeArea: json["administrative_area"],
+        country: json["country"],
+        faxNumber: json["fax_number"],
+        locality: json["locality"],
+        mobileNumber: json["mobile_number"],
+        phoneNumber: json["phone_number"],
+        phoneNumberExtension: json["phone_number_extension"],
+        postalCode: json["postal_code"],
+        subPremise: json["sub_premise"],
+        thoroughfare: json["thoroughfare"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "administrative_area": administrativeArea,
+        "country": country,
+        "fax_number": faxNumber,
+        "locality": locality,
+        "mobile_number": mobileNumber,
+        "phone_number": phoneNumber,
+        "phone_number_extension": phoneNumberExtension,
+        "postal_code": postalCode,
+        "sub_premise": subPremise,
+        "thoroughfare": thoroughfare,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart
new file mode 100644
index 0000000..ea6fc77
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart
@@ -0,0 +1,417 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final String text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": text,
+    };
+}
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/e0ac7.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e0ac7.json/default/TopLevel.dart
new file mode 100644
index 0000000..25cb749
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e0ac7.json/default/TopLevel.dart
@@ -0,0 +1,465 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final String username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": username,
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final DownsizedSmall? hd;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        this.hd,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        hd: json["hd"] == null ? null : DownsizedSmall.fromJson(json["hd"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "hd": hd?.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    G,
+    PG,
+    Y
+}
+
+final ratingValues = EnumValues({
+    "g": Rating.G,
+    "pg": Rating.PG,
+    "y": Rating.Y
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String twitter;
+    final String username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        required this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: json["username"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": username,
+    };
+}
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart
new file mode 100644
index 0000000..d1d3b2a
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart
@@ -0,0 +1,437 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Query query;
+
+    TopLevel({
+        required this.query,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        query: Query.fromJson(json["query"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "query": query.toJson(),
+    };
+}
+
+class Query {
+    final int count;
+    final DateTime created;
+    final String lang;
+    final Results results;
+
+    Query({
+        required this.count,
+        required this.created,
+        required this.lang,
+        required this.results,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        count: json["count"],
+        created: DateTime.parse(json["created"]),
+        lang: json["lang"],
+        results: Results.fromJson(json["results"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "created": created.toIso8601String(),
+        "lang": lang,
+        "results": results.toJson(),
+    };
+}
+
+class Results {
+    final Channel channel;
+
+    Results({
+        required this.channel,
+    });
+
+    factory Results.fromJson(Map<String, dynamic> json) => Results(
+        channel: Channel.fromJson(json["channel"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "channel": channel.toJson(),
+    };
+}
+
+class Channel {
+    final Astronomy astronomy;
+    final Atmosphere atmosphere;
+    final String description;
+    final Image image;
+    final Item item;
+    final String language;
+    final String lastBuildDate;
+    final String link;
+    final Location location;
+    final String title;
+    final String ttl;
+    final Units units;
+    final Wind wind;
+
+    Channel({
+        required this.astronomy,
+        required this.atmosphere,
+        required this.description,
+        required this.image,
+        required this.item,
+        required this.language,
+        required this.lastBuildDate,
+        required this.link,
+        required this.location,
+        required this.title,
+        required this.ttl,
+        required this.units,
+        required this.wind,
+    });
+
+    factory Channel.fromJson(Map<String, dynamic> json) => Channel(
+        astronomy: Astronomy.fromJson(json["astronomy"]),
+        atmosphere: Atmosphere.fromJson(json["atmosphere"]),
+        description: json["description"],
+        image: Image.fromJson(json["image"]),
+        item: Item.fromJson(json["item"]),
+        language: json["language"],
+        lastBuildDate: json["lastBuildDate"],
+        link: json["link"],
+        location: Location.fromJson(json["location"]),
+        title: json["title"],
+        ttl: json["ttl"],
+        units: Units.fromJson(json["units"]),
+        wind: Wind.fromJson(json["wind"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "astronomy": astronomy.toJson(),
+        "atmosphere": atmosphere.toJson(),
+        "description": description,
+        "image": image.toJson(),
+        "item": item.toJson(),
+        "language": language,
+        "lastBuildDate": lastBuildDate,
+        "link": link,
+        "location": location.toJson(),
+        "title": title,
+        "ttl": ttl,
+        "units": units.toJson(),
+        "wind": wind.toJson(),
+    };
+}
+
+class Astronomy {
+    final String sunrise;
+    final String sunset;
+
+    Astronomy({
+        required this.sunrise,
+        required this.sunset,
+    });
+
+    factory Astronomy.fromJson(Map<String, dynamic> json) => Astronomy(
+        sunrise: json["sunrise"],
+        sunset: json["sunset"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "sunrise": sunrise,
+        "sunset": sunset,
+    };
+}
+
+class Atmosphere {
+    final String humidity;
+    final String pressure;
+    final String rising;
+    final String visibility;
+
+    Atmosphere({
+        required this.humidity,
+        required this.pressure,
+        required this.rising,
+        required this.visibility,
+    });
+
+    factory Atmosphere.fromJson(Map<String, dynamic> json) => Atmosphere(
+        humidity: json["humidity"],
+        pressure: json["pressure"],
+        rising: json["rising"],
+        visibility: json["visibility"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "humidity": humidity,
+        "pressure": pressure,
+        "rising": rising,
+        "visibility": visibility,
+    };
+}
+
+class Image {
+    final String height;
+    final String link;
+    final String title;
+    final String url;
+    final String width;
+
+    Image({
+        required this.height,
+        required this.link,
+        required this.title,
+        required this.url,
+        required this.width,
+    });
+
+    factory Image.fromJson(Map<String, dynamic> json) => Image(
+        height: json["height"],
+        link: json["link"],
+        title: json["title"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "link": link,
+        "title": title,
+        "url": url,
+        "width": width,
+    };
+}
+
+class Item {
+    final Condition condition;
+    final String description;
+    final List<Forecast> forecast;
+    final Guid guid;
+    final String lat;
+    final String link;
+    final String long;
+    final String pubDate;
+    final String title;
+
+    Item({
+        required this.condition,
+        required this.description,
+        required this.forecast,
+        required this.guid,
+        required this.lat,
+        required this.link,
+        required this.long,
+        required this.pubDate,
+        required this.title,
+    });
+
+    factory Item.fromJson(Map<String, dynamic> json) => Item(
+        condition: Condition.fromJson(json["condition"]),
+        description: json["description"],
+        forecast: List<Forecast>.from(json["forecast"].map((x) => Forecast.fromJson(x))),
+        guid: Guid.fromJson(json["guid"]),
+        lat: json["lat"],
+        link: json["link"],
+        long: json["long"],
+        pubDate: json["pubDate"],
+        title: json["title"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "condition": condition.toJson(),
+        "description": description,
+        "forecast": List<dynamic>.from(forecast.map((x) => x.toJson())),
+        "guid": guid.toJson(),
+        "lat": lat,
+        "link": link,
+        "long": long,
+        "pubDate": pubDate,
+        "title": title,
+    };
+}
+
+class Condition {
+    final String code;
+    final String date;
+    final String temp;
+    final String text;
+
+    Condition({
+        required this.code,
+        required this.date,
+        required this.temp,
+        required this.text,
+    });
+
+    factory Condition.fromJson(Map<String, dynamic> json) => Condition(
+        code: json["code"],
+        date: json["date"],
+        temp: json["temp"],
+        text: json["text"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "temp": temp,
+        "text": text,
+    };
+}
+
+class Forecast {
+    final String code;
+    final String date;
+    final String day;
+    final String high;
+    final String low;
+    final Text text;
+
+    Forecast({
+        required this.code,
+        required this.date,
+        required this.day,
+        required this.high,
+        required this.low,
+        required this.text,
+    });
+
+    factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
+        code: json["code"],
+        date: json["date"],
+        day: json["day"],
+        high: json["high"],
+        low: json["low"],
+        text: textValues.map[json["text"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "date": date,
+        "day": day,
+        "high": high,
+        "low": low,
+        "text": textValues.reverse[text],
+    };
+}
+
+enum Text {
+    SUNNY
+}
+
+final textValues = EnumValues({
+    "Sunny": Text.SUNNY
+});
+
+class Guid {
+    final String isPermaLink;
+
+    Guid({
+        required this.isPermaLink,
+    });
+
+    factory Guid.fromJson(Map<String, dynamic> json) => Guid(
+        isPermaLink: json["isPermaLink"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "isPermaLink": isPermaLink,
+    };
+}
+
+class Location {
+    final String city;
+    final String country;
+    final String region;
+
+    Location({
+        required this.city,
+        required this.country,
+        required this.region,
+    });
+
+    factory Location.fromJson(Map<String, dynamic> json) => Location(
+        city: json["city"],
+        country: json["country"],
+        region: json["region"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "city": city,
+        "country": country,
+        "region": region,
+    };
+}
+
+class Units {
+    final String distance;
+    final String pressure;
+    final String speed;
+    final String temperature;
+
+    Units({
+        required this.distance,
+        required this.pressure,
+        required this.speed,
+        required this.temperature,
+    });
+
+    factory Units.fromJson(Map<String, dynamic> json) => Units(
+        distance: json["distance"],
+        pressure: json["pressure"],
+        speed: json["speed"],
+        temperature: json["temperature"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "distance": distance,
+        "pressure": pressure,
+        "speed": speed,
+        "temperature": temperature,
+    };
+}
+
+class Wind {
+    final String chill;
+    final String direction;
+    final String speed;
+
+    Wind({
+        required this.chill,
+        required this.direction,
+        required this.speed,
+    });
+
+    factory Wind.fromJson(Map<String, dynamic> json) => Wind(
+        chill: json["chill"],
+        direction: json["direction"],
+        speed: json["speed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "chill": chill,
+        "direction": direction,
+        "speed": speed,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/e2a58.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e2a58.json/default/TopLevel.dart
new file mode 100644
index 0000000..60278ec
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e2a58.json/default/TopLevel.dart
@@ -0,0 +1,29 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String date;
+    final List<String> stopAndSearch;
+
+    TopLevel({
+        required this.date,
+        required this.stopAndSearch,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        date: json["date"],
+        stopAndSearch: List<String>.from(json["stop-and-search"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "date": date,
+        "stop-and-search": List<dynamic>.from(stopAndSearch.map((x) => x)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/e324e.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e324e.json/default/TopLevel.dart
new file mode 100644
index 0000000..c4b7dfc
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e324e.json/default/TopLevel.dart
@@ -0,0 +1,321 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String basePath;
+    final Definitions definitions;
+    final String host;
+    final Info info;
+    final Paths paths;
+    final List<String> produces;
+    final List<String> schemes;
+    final String swagger;
+
+    TopLevel({
+        required this.basePath,
+        required this.definitions,
+        required this.host,
+        required this.info,
+        required this.paths,
+        required this.produces,
+        required this.schemes,
+        required this.swagger,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        basePath: json["basePath"],
+        definitions: Definitions.fromJson(json["definitions"]),
+        host: json["host"],
+        info: Info.fromJson(json["info"]),
+        paths: Paths.fromJson(json["paths"]),
+        produces: List<String>.from(json["produces"].map((x) => x)),
+        schemes: List<String>.from(json["schemes"].map((x) => x)),
+        swagger: json["swagger"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "basePath": basePath,
+        "definitions": definitions.toJson(),
+        "host": host,
+        "info": info.toJson(),
+        "paths": paths.toJson(),
+        "produces": List<dynamic>.from(produces.map((x) => x)),
+        "schemes": List<dynamic>.from(schemes.map((x) => x)),
+        "swagger": swagger,
+    };
+}
+
+class Definitions {
+    final Rate rate;
+
+    Definitions({
+        required this.rate,
+    });
+
+    factory Definitions.fromJson(Map<String, dynamic> json) => Definitions(
+        rate: Rate.fromJson(json["Rate"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Rate": rate.toJson(),
+    };
+}
+
+class Rate {
+    final Map<String, Property> properties;
+
+    Rate({
+        required this.properties,
+    });
+
+    factory Rate.fromJson(Map<String, dynamic> json) => Rate(
+        properties: Map.from(json["properties"]).map((k, v) => MapEntry<String, Property>(k, Property.fromJson(v))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": Map.from(properties).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+    };
+}
+
+class Property {
+    final String description;
+    final Type type;
+
+    Property({
+        required this.description,
+        required this.type,
+    });
+
+    factory Property.fromJson(Map<String, dynamic> json) => Property(
+        description: json["description"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum Type {
+    STRING
+}
+
+final typeValues = EnumValues({
+    "string": Type.STRING
+});
+
+class Info {
+    final String description;
+    final String title;
+    final String version;
+
+    Info({
+        required this.description,
+        required this.title,
+        required this.version,
+    });
+
+    factory Info.fromJson(Map<String, dynamic> json) => Info(
+        description: json["description"],
+        title: json["title"],
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "title": title,
+        "version": version,
+    };
+}
+
+class Paths {
+    final TariffRatesSearch tariffRatesSearch;
+
+    Paths({
+        required this.tariffRatesSearch,
+    });
+
+    factory Paths.fromJson(Map<String, dynamic> json) => Paths(
+        tariffRatesSearch: TariffRatesSearch.fromJson(json["/tariff_rates/search"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "/tariff_rates/search": tariffRatesSearch.toJson(),
+    };
+}
+
+class TariffRatesSearch {
+    final Get tariffRatesSearchGet;
+
+    TariffRatesSearch({
+        required this.tariffRatesSearchGet,
+    });
+
+    factory TariffRatesSearch.fromJson(Map<String, dynamic> json) => TariffRatesSearch(
+        tariffRatesSearchGet: Get.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": tariffRatesSearchGet.toJson(),
+    };
+}
+
+class Get {
+    final String description;
+    final List<Parameter> parameters;
+    final Responses responses;
+    final String summary;
+    final List<String> tags;
+
+    Get({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory Get.fromJson(Map<String, dynamic> json) => Get(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: Responses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class Parameter {
+    final String description;
+    final Type format;
+    final String name;
+    final String parameterIn;
+    final bool required;
+    final Type type;
+
+    Parameter({
+        required this.description,
+        required this.format,
+        required this.name,
+        required this.parameterIn,
+        required this.required,
+        required this.type,
+    });
+
+    factory Parameter.fromJson(Map<String, dynamic> json) => Parameter(
+        description: json["description"],
+        format: typeValues.map[json["format"]]!,
+        name: json["name"],
+        parameterIn: json["in"],
+        required: json["required"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "format": typeValues.reverse[format],
+        "name": name,
+        "in": parameterIn,
+        "required": required,
+        "type": typeValues.reverse[type],
+    };
+}
+
+class Responses {
+    final The200 the200;
+
+    Responses({
+        required this.the200,
+    });
+
+    factory Responses.fromJson(Map<String, dynamic> json) => Responses(
+        the200: The200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class The200 {
+    final String description;
+    final Schema schema;
+
+    The200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory The200.fromJson(Map<String, dynamic> json) => The200(
+        description: json["description"],
+        schema: Schema.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class Schema {
+    final Items items;
+    final String type;
+
+    Schema({
+        required this.items,
+        required this.type,
+    });
+
+    factory Schema.fromJson(Map<String, dynamic> json) => Schema(
+        items: Items.fromJson(json["items"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "items": items.toJson(),
+        "type": type,
+    };
+}
+
+class Items {
+    final String ref;
+
+    Items({
+        required this.ref,
+    });
+
+    factory Items.fromJson(Map<String, dynamic> json) => Items(
+        ref: json["\u0024ref"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "\u0024ref": ref,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/e53b5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e53b5.json/default/TopLevel.dart
new file mode 100644
index 0000000..1677d96
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e53b5.json/default/TopLevel.dart
@@ -0,0 +1,121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<dynamic> topLevelFromJson(String str) => List<dynamic>.from(json.decode(str).map((x) => x));
+
+String topLevelToJson(List<dynamic> data) => json.encode(List<dynamic>.from(data.map((x) => x)));
+
+class TopLevelElement {
+    final Country country;
+    final String date;
+    final String decimal;
+    final Country indicator;
+    final String value;
+
+    TopLevelElement({
+        required this.country,
+        required this.date,
+        required this.decimal,
+        required this.indicator,
+        required this.value,
+    });
+
+    factory TopLevelElement.fromJson(Map<String, dynamic> json) => TopLevelElement(
+        country: Country.fromJson(json["country"]),
+        date: json["date"],
+        decimal: json["decimal"],
+        indicator: Country.fromJson(json["indicator"]),
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "country": country.toJson(),
+        "date": date,
+        "decimal": decimal,
+        "indicator": indicator.toJson(),
+        "value": value,
+    };
+}
+
+class Country {
+    final Id id;
+    final Value value;
+
+    Country({
+        required this.id,
+        required this.value,
+    });
+
+    factory Country.fromJson(Map<String, dynamic> json) => Country(
+        id: idValues.map[json["id"]]!,
+        value: valueValues.map[json["value"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": idValues.reverse[id],
+        "value": valueValues.reverse[value],
+    };
+}
+
+enum Id {
+    IN,
+    SP_POP_TOTL
+}
+
+final idValues = EnumValues({
+    "IN": Id.IN,
+    "SP.POP.TOTL": Id.SP_POP_TOTL
+});
+
+enum Value {
+    INDIA,
+    POPULATION_TOTAL
+}
+
+final valueValues = EnumValues({
+    "India": Value.INDIA,
+    "Population, total": Value.POPULATION_TOTAL
+});
+
+class PurpleTopLevel {
+    final int page;
+    final int pages;
+    final String perPage;
+    final int total;
+
+    PurpleTopLevel({
+        required this.page,
+        required this.pages,
+        required this.perPage,
+        required this.total,
+    });
+
+    factory PurpleTopLevel.fromJson(Map<String, dynamic> json) => PurpleTopLevel(
+        page: json["page"],
+        pages: json["pages"],
+        perPage: json["per_page"],
+        total: json["total"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "page": page,
+        "pages": pages,
+        "per_page": perPage,
+        "total": total,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/e64a0.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e64a0.json/default/TopLevel.dart
new file mode 100644
index 0000000..e9728af
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e64a0.json/default/TopLevel.dart
@@ -0,0 +1,75 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Args args;
+    final Headers headers;
+    final String origin;
+    final String url;
+
+    TopLevel({
+        required this.args,
+        required this.headers,
+        required this.origin,
+        required this.url,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        args: Args.fromJson(json["args"]),
+        headers: Headers.fromJson(json["headers"]),
+        origin: json["origin"],
+        url: json["url"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "args": args.toJson(),
+        "headers": headers.toJson(),
+        "origin": origin,
+        "url": url,
+    };
+}
+
+class Args {
+    Args();
+
+    factory Args.fromJson(Map<String, dynamic> json) => Args(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Headers {
+    final String acceptEncoding;
+    final String connection;
+    final String host;
+    final String userAgent;
+
+    Headers({
+        required this.acceptEncoding,
+        required this.connection,
+        required this.host,
+        required this.userAgent,
+    });
+
+    factory Headers.fromJson(Map<String, dynamic> json) => Headers(
+        acceptEncoding: json["Accept-Encoding"],
+        connection: json["Connection"],
+        host: json["Host"],
+        userAgent: json["User-Agent"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Accept-Encoding": acceptEncoding,
+        "Connection": connection,
+        "Host": host,
+        "User-Agent": userAgent,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/e8a0b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e8a0b.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e8a0b.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/e8b04.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e8b04.json/default/TopLevel.dart
new file mode 100644
index 0000000..40a5df9
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/e8b04.json/default/TopLevel.dart
@@ -0,0 +1,995 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int averageRating;
+    final String? category;
+    final int createdAt;
+    final String? description;
+    final DisplayType? displayType;
+    final int downloadCount;
+    final List<TopLevelFlag>? flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int? indexUpdatedAt;
+    final String locale;
+    final TopLevelMetadata metadata;
+    final bool? moderationStatus;
+    final ModifyingViewUid? modifyingViewUid;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final Provenance provenance;
+    final bool publicationAppendEnabled;
+    final int? publicationDate;
+    final int publicationGroup;
+    final PublicationStage publicationStage;
+    final Ratings? ratings;
+    final String? resourceName;
+    final List<Right> rights;
+    final String? rowClass;
+    final int? rowIdentifierColumnId;
+    final int? rowsUpdatedAt;
+    final RowsUpdatedBy? rowsUpdatedBy;
+    final TableAuthor tableAuthor;
+    final int tableId;
+    final List<String>? tags;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final ViewType viewType;
+
+    TopLevel({
+        required this.averageRating,
+        this.category,
+        required this.createdAt,
+        this.description,
+        this.displayType,
+        required this.downloadCount,
+        this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        this.indexUpdatedAt,
+        required this.locale,
+        required this.metadata,
+        this.moderationStatus,
+        this.modifyingViewUid,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        this.ratings,
+        this.resourceName,
+        required this.rights,
+        this.rowClass,
+        this.rowIdentifierColumnId,
+        this.rowsUpdatedAt,
+        this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        this.tags,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        averageRating: json["averageRating"],
+        category: json["category"],
+        createdAt: json["createdAt"],
+        description: json["description"],
+        displayType: displayTypeValues.map[json["displayType"]],
+        downloadCount: json["downloadCount"],
+        flags: json["flags"] == null ? null : List<TopLevelFlag>.from(json["flags"]!.map((x) => topLevelFlagValues.map[x]!)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        locale: json["locale"],
+        metadata: TopLevelMetadata.fromJson(json["metadata"]),
+        moderationStatus: json["moderationStatus"],
+        modifyingViewUid: modifyingViewUidValues.map[json["modifyingViewUid"]],
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: provenanceValues.map[json["provenance"]]!,
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: publicationStageValues.map[json["publicationStage"]]!,
+        ratings: json["ratings"] == null ? null : Ratings.fromJson(json["ratings"]),
+        resourceName: json["resourceName"],
+        rights: List<Right>.from(json["rights"].map((x) => rightValues.map[x]!)),
+        rowClass: json["rowClass"],
+        rowIdentifierColumnId: json["rowIdentifierColumnId"],
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: rowsUpdatedByValues.map[json["rowsUpdatedBy"]],
+        tableAuthor: TableAuthor.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        tags: json["tags"] == null ? null : List<String>.from(json["tags"]!.map((x) => x)),
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: viewTypeValues.map[json["viewType"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "averageRating": averageRating,
+        "category": category,
+        "createdAt": createdAt,
+        "description": description,
+        "displayType": displayTypeValues.reverse[displayType],
+        "downloadCount": downloadCount,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => topLevelFlagValues.reverse[x])),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "moderationStatus": moderationStatus,
+        "modifyingViewUid": modifyingViewUidValues.reverse[modifyingViewUid],
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenanceValues.reverse[provenance],
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStageValues.reverse[publicationStage],
+        "ratings": ratings?.toJson(),
+        "resourceName": resourceName,
+        "rights": List<dynamic>.from(rights.map((x) => rightValues.reverse[x])),
+        "rowClass": rowClass,
+        "rowIdentifierColumnId": rowIdentifierColumnId,
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedByValues.reverse[rowsUpdatedBy],
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "tags": tags == null ? null : List<dynamic>.from(tags!.map((x) => x)),
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewTypeValues.reverse[viewType],
+    };
+}
+
+enum DisplayType {
+    TABLE,
+    DATA_LENS,
+    FATROW,
+    PAGE
+}
+
+final displayTypeValues = EnumValues({
+    "table": DisplayType.TABLE,
+    "data_lens": DisplayType.DATA_LENS,
+    "fatrow": DisplayType.FATROW,
+    "page": DisplayType.PAGE
+});
+
+enum TopLevelFlag {
+    DEFAULT,
+    RESTORABLE,
+    RESTORE_POSSIBLE_FOR_TYPE
+}
+
+final topLevelFlagValues = EnumValues({
+    "default": TopLevelFlag.DEFAULT,
+    "restorable": TopLevelFlag.RESTORABLE,
+    "restorePossibleForType": TopLevelFlag.RESTORE_POSSIBLE_FOR_TYPE
+});
+
+class Grant {
+    final List<GrantFlag> flags;
+    final bool inherited;
+    final GrantType type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<GrantFlag>.from(json["flags"].map((x) => grantFlagValues.map[x]!)),
+        inherited: json["inherited"],
+        type: grantTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => grantFlagValues.reverse[x])),
+        "inherited": inherited,
+        "type": grantTypeValues.reverse[type],
+    };
+}
+
+enum GrantFlag {
+    PUBLIC
+}
+
+final grantFlagValues = EnumValues({
+    "public": GrantFlag.PUBLIC
+});
+
+enum GrantType {
+    VIEWER
+}
+
+final grantTypeValues = EnumValues({
+    "viewer": GrantType.VIEWER
+});
+
+class TopLevelMetadata {
+    final List<DisplayType>? availableDisplayTypes;
+    final CustomFields? customFields;
+    final JsonQuery? jsonQuery;
+    final String? rdfClass;
+    final String? rdfSubject;
+    final MetadataRenderTypeConfig? renderTypeConfig;
+    final RichRendererConfigs? richRendererConfigs;
+    final String? rowIdentifier;
+    final String? rowLabel;
+    final V1ArchivedProperties? v1ArchivedProperties;
+
+    TopLevelMetadata({
+        this.availableDisplayTypes,
+        this.customFields,
+        this.jsonQuery,
+        this.rdfClass,
+        this.rdfSubject,
+        this.renderTypeConfig,
+        this.richRendererConfigs,
+        this.rowIdentifier,
+        this.rowLabel,
+        this.v1ArchivedProperties,
+    });
+
+    factory TopLevelMetadata.fromJson(Map<String, dynamic> json) => TopLevelMetadata(
+        availableDisplayTypes: json["availableDisplayTypes"] == null ? null : List<DisplayType>.from(json["availableDisplayTypes"]!.map((x) => displayTypeValues.map[x]!)),
+        customFields: json["custom_fields"] == null ? null : CustomFields.fromJson(json["custom_fields"]),
+        jsonQuery: json["jsonQuery"] == null ? null : JsonQuery.fromJson(json["jsonQuery"]),
+        rdfClass: json["rdfClass"],
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: json["renderTypeConfig"] == null ? null : MetadataRenderTypeConfig.fromJson(json["renderTypeConfig"]),
+        richRendererConfigs: json["richRendererConfigs"] == null ? null : RichRendererConfigs.fromJson(json["richRendererConfigs"]),
+        rowIdentifier: json["rowIdentifier"],
+        rowLabel: json["rowLabel"],
+        v1ArchivedProperties: json["v1_archived_properties"] == null ? null : V1ArchivedProperties.fromJson(json["v1_archived_properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "availableDisplayTypes": availableDisplayTypes == null ? null : List<dynamic>.from(availableDisplayTypes!.map((x) => displayTypeValues.reverse[x])),
+        "custom_fields": customFields?.toJson(),
+        "jsonQuery": jsonQuery?.toJson(),
+        "rdfClass": rdfClass,
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig?.toJson(),
+        "richRendererConfigs": richRendererConfigs?.toJson(),
+        "rowIdentifier": rowIdentifier,
+        "rowLabel": rowLabel,
+        "v1_archived_properties": v1ArchivedProperties?.toJson(),
+    };
+}
+
+class CustomFields {
+    final Test test;
+
+    CustomFields({
+        required this.test,
+    });
+
+    factory CustomFields.fromJson(Map<String, dynamic> json) => CustomFields(
+        test: Test.fromJson(json["TEST"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "TEST": test.toJson(),
+    };
+}
+
+class Test {
+    final String cfpb1;
+
+    Test({
+        required this.cfpb1,
+    });
+
+    factory Test.fromJson(Map<String, dynamic> json) => Test(
+        cfpb1: json["CFPB1"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "CFPB1": cfpb1,
+    };
+}
+
+class JsonQuery {
+    final List<Group>? group;
+    final List<Order>? order;
+    final List<Select>? select;
+    final Where? where;
+
+    JsonQuery({
+        this.group,
+        this.order,
+        this.select,
+        this.where,
+    });
+
+    factory JsonQuery.fromJson(Map<String, dynamic> json) => JsonQuery(
+        group: json["group"] == null ? null : List<Group>.from(json["group"]!.map((x) => Group.fromJson(x))),
+        order: json["order"] == null ? null : List<Order>.from(json["order"]!.map((x) => Order.fromJson(x))),
+        select: json["select"] == null ? null : List<Select>.from(json["select"]!.map((x) => Select.fromJson(x))),
+        where: json["where"] == null ? null : Where.fromJson(json["where"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "group": group == null ? null : List<dynamic>.from(group!.map((x) => x.toJson())),
+        "order": order == null ? null : List<dynamic>.from(order!.map((x) => x.toJson())),
+        "select": select == null ? null : List<dynamic>.from(select!.map((x) => x.toJson())),
+        "where": where?.toJson(),
+    };
+}
+
+class Group {
+    final String columnFieldName;
+
+    Group({
+        required this.columnFieldName,
+    });
+
+    factory Group.fromJson(Map<String, dynamic> json) => Group(
+        columnFieldName: json["columnFieldName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "columnFieldName": columnFieldName,
+    };
+}
+
+class Order {
+    final bool ascending;
+    final OrderColumnFieldName columnFieldName;
+
+    Order({
+        required this.ascending,
+        required this.columnFieldName,
+    });
+
+    factory Order.fromJson(Map<String, dynamic> json) => Order(
+        ascending: json["ascending"],
+        columnFieldName: orderColumnFieldNameValues.map[json["columnFieldName"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "columnFieldName": orderColumnFieldNameValues.reverse[columnFieldName],
+    };
+}
+
+enum OrderColumnFieldName {
+    DATE_RECEIVED,
+    AGREEMENT_DATE,
+    IN_EFFECT_AS_OF_112012
+}
+
+final orderColumnFieldNameValues = EnumValues({
+    "date_received": OrderColumnFieldName.DATE_RECEIVED,
+    "agreement_date": OrderColumnFieldName.AGREEMENT_DATE,
+    "in_effect_as_of_1_1_2012": OrderColumnFieldName.IN_EFFECT_AS_OF_112012
+});
+
+class Select {
+    final String? aggregate;
+    final String columnFieldName;
+
+    Select({
+        this.aggregate,
+        required this.columnFieldName,
+    });
+
+    factory Select.fromJson(Map<String, dynamic> json) => Select(
+        aggregate: json["aggregate"],
+        columnFieldName: json["columnFieldName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "aggregate": aggregate,
+        "columnFieldName": columnFieldName,
+    };
+}
+
+class Where {
+    final List<Child>? children;
+    final ChildColumnFieldName? columnFieldName;
+    final ChildMetadata? metadata;
+    final String? value;
+    final WhereOperator whereOperator;
+
+    Where({
+        this.children,
+        this.columnFieldName,
+        this.metadata,
+        this.value,
+        required this.whereOperator,
+    });
+
+    factory Where.fromJson(Map<String, dynamic> json) => Where(
+        children: json["children"] == null ? null : List<Child>.from(json["children"]!.map((x) => Child.fromJson(x))),
+        columnFieldName: childColumnFieldNameValues.map[json["columnFieldName"]],
+        metadata: json["metadata"] == null ? null : ChildMetadata.fromJson(json["metadata"]),
+        value: json["value"],
+        whereOperator: whereOperatorValues.map[json["operator"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "children": children == null ? null : List<dynamic>.from(children!.map((x) => x.toJson())),
+        "columnFieldName": childColumnFieldNameValues.reverse[columnFieldName],
+        "metadata": metadata?.toJson(),
+        "value": value,
+        "operator": whereOperatorValues.reverse[whereOperator],
+    };
+}
+
+class Child {
+    final ChildOperator childOperator;
+    final ChildColumnFieldName columnFieldName;
+    final ChildMetadata? metadata;
+    final String? value;
+
+    Child({
+        required this.childOperator,
+        required this.columnFieldName,
+        this.metadata,
+        this.value,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        childOperator: childOperatorValues.map[json["operator"]]!,
+        columnFieldName: childColumnFieldNameValues.map[json["columnFieldName"]]!,
+        metadata: json["metadata"] == null ? null : ChildMetadata.fromJson(json["metadata"]),
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "operator": childOperatorValues.reverse[childOperator],
+        "columnFieldName": childColumnFieldNameValues.reverse[columnFieldName],
+        "metadata": metadata?.toJson(),
+        "value": value,
+    };
+}
+
+enum ChildOperator {
+    EQUALS,
+    IS_NOT_BLANK
+}
+
+final childOperatorValues = EnumValues({
+    "EQUALS": ChildOperator.EQUALS,
+    "IS_NOT_BLANK": ChildOperator.IS_NOT_BLANK
+});
+
+enum ChildColumnFieldName {
+    PRODUCT,
+    COMPLAINT_WHAT_HAPPENED,
+    SUB_PRODUCT,
+    ISSUE
+}
+
+final childColumnFieldNameValues = EnumValues({
+    "product": ChildColumnFieldName.PRODUCT,
+    "complaint_what_happened": ChildColumnFieldName.COMPLAINT_WHAT_HAPPENED,
+    "sub_product": ChildColumnFieldName.SUB_PRODUCT,
+    "issue": ChildColumnFieldName.ISSUE
+});
+
+class ChildMetadata {
+    final List<String>? customValues;
+    final bool? freeform;
+    final int? includeAuto;
+    final MetadataOperator? metadataOperator;
+    final TableColumnId? tableColumnId;
+    final int? unifiedVersion;
+
+    ChildMetadata({
+        this.customValues,
+        this.freeform,
+        this.includeAuto,
+        this.metadataOperator,
+        this.tableColumnId,
+        this.unifiedVersion,
+    });
+
+    factory ChildMetadata.fromJson(Map<String, dynamic> json) => ChildMetadata(
+        customValues: json["customValues"] == null ? null : List<String>.from(json["customValues"]!.map((x) => x)),
+        freeform: json["freeform"],
+        includeAuto: json["includeAuto"],
+        metadataOperator: metadataOperatorValues.map[json["operator"]],
+        tableColumnId: json["tableColumnId"] == null ? null : TableColumnId.fromJson(json["tableColumnId"]),
+        unifiedVersion: json["unifiedVersion"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "customValues": customValues == null ? null : List<dynamic>.from(customValues!.map((x) => x)),
+        "freeform": freeform,
+        "includeAuto": includeAuto,
+        "operator": metadataOperatorValues.reverse[metadataOperator],
+        "tableColumnId": tableColumnId?.toJson(),
+        "unifiedVersion": unifiedVersion,
+    };
+}
+
+enum MetadataOperator {
+    EQUALS,
+    BLANK
+}
+
+final metadataOperatorValues = EnumValues({
+    "EQUALS": MetadataOperator.EQUALS,
+    "blank?": MetadataOperator.BLANK
+});
+
+class TableColumnId {
+    final int the2819740;
+
+    TableColumnId({
+        required this.the2819740,
+    });
+
+    factory TableColumnId.fromJson(Map<String, dynamic> json) => TableColumnId(
+        the2819740: json["2819740"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "2819740": the2819740,
+    };
+}
+
+enum WhereOperator {
+    EQUALS,
+    AND
+}
+
+final whereOperatorValues = EnumValues({
+    "EQUALS": WhereOperator.EQUALS,
+    "AND": WhereOperator.AND
+});
+
+class MetadataRenderTypeConfig {
+    final PurpleVisible visible;
+
+    MetadataRenderTypeConfig({
+        required this.visible,
+    });
+
+    factory MetadataRenderTypeConfig.fromJson(Map<String, dynamic> json) => MetadataRenderTypeConfig(
+        visible: PurpleVisible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class PurpleVisible {
+    final bool? fatrow;
+    final bool? table;
+
+    PurpleVisible({
+        this.fatrow,
+        this.table,
+    });
+
+    factory PurpleVisible.fromJson(Map<String, dynamic> json) => PurpleVisible(
+        fatrow: json["fatrow"],
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "fatrow": fatrow,
+        "table": table,
+    };
+}
+
+class RichRendererConfigs {
+    final FatRow fatRow;
+
+    RichRendererConfigs({
+        required this.fatRow,
+    });
+
+    factory RichRendererConfigs.fromJson(Map<String, dynamic> json) => RichRendererConfigs(
+        fatRow: FatRow.fromJson(json["fatRow"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "fatRow": fatRow.toJson(),
+    };
+}
+
+class FatRow {
+    final List<Column> columns;
+
+    FatRow({
+        required this.columns,
+    });
+
+    factory FatRow.fromJson(Map<String, dynamic> json) => FatRow(
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+    };
+}
+
+class Column {
+    final List<Row> rows;
+    final Styles styles;
+
+    Column({
+        required this.rows,
+        required this.styles,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        rows: List<Row>.from(json["rows"].map((x) => Row.fromJson(x))),
+        styles: Styles.fromJson(json["styles"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "rows": List<dynamic>.from(rows.map((x) => x.toJson())),
+        "styles": styles.toJson(),
+    };
+}
+
+class Row {
+    final List<Field> fields;
+
+    Row({
+        required this.fields,
+    });
+
+    factory Row.fromJson(Map<String, dynamic> json) => Row(
+        fields: List<Field>.from(json["fields"].map((x) => Field.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "fields": List<dynamic>.from(fields.map((x) => x.toJson())),
+    };
+}
+
+class Field {
+    final int tableColumnId;
+    final FieldType type;
+
+    Field({
+        required this.tableColumnId,
+        required this.type,
+    });
+
+    factory Field.fromJson(Map<String, dynamic> json) => Field(
+        tableColumnId: json["tableColumnId"],
+        type: fieldTypeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "tableColumnId": tableColumnId,
+        "type": fieldTypeValues.reverse[type],
+    };
+}
+
+enum FieldType {
+    COLUMN_LABEL,
+    COLUMN_DATA
+}
+
+final fieldTypeValues = EnumValues({
+    "columnLabel": FieldType.COLUMN_LABEL,
+    "columnData": FieldType.COLUMN_DATA
+});
+
+class Styles {
+    final Width width;
+
+    Styles({
+        required this.width,
+    });
+
+    factory Styles.fromJson(Map<String, dynamic> json) => Styles(
+        width: widthValues.map[json["width"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "width": widthValues.reverse[width],
+    };
+}
+
+enum Width {
+    THE_27,
+    THE_40,
+    THE_30,
+    THE_33
+}
+
+final widthValues = EnumValues({
+    "27%": Width.THE_27,
+    "40%": Width.THE_40,
+    "30%": Width.THE_30,
+    "33%": Width.THE_33
+});
+
+class V1ArchivedProperties {
+    final AccessPoints accessPoints;
+    final String blistId;
+    final V1ArchivedPropertiesRenderTypeConfig renderTypeConfig;
+
+    V1ArchivedProperties({
+        required this.accessPoints,
+        required this.blistId,
+        required this.renderTypeConfig,
+    });
+
+    factory V1ArchivedProperties.fromJson(Map<String, dynamic> json) => V1ArchivedProperties(
+        accessPoints: AccessPoints.fromJson(json["accessPoints"]),
+        blistId: json["blist_id"],
+        renderTypeConfig: V1ArchivedPropertiesRenderTypeConfig.fromJson(json["renderTypeConfig"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "accessPoints": accessPoints.toJson(),
+        "blist_id": blistId,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+    };
+}
+
+class AccessPoints {
+    final String newView;
+
+    AccessPoints({
+        required this.newView,
+    });
+
+    factory AccessPoints.fromJson(Map<String, dynamic> json) => AccessPoints(
+        newView: json["new_view"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "new_view": newView,
+    };
+}
+
+class V1ArchivedPropertiesRenderTypeConfig {
+    final FluffyVisible visible;
+
+    V1ArchivedPropertiesRenderTypeConfig({
+        required this.visible,
+    });
+
+    factory V1ArchivedPropertiesRenderTypeConfig.fromJson(Map<String, dynamic> json) => V1ArchivedPropertiesRenderTypeConfig(
+        visible: FluffyVisible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class FluffyVisible {
+    final bool href;
+
+    FluffyVisible({
+        required this.href,
+    });
+
+    factory FluffyVisible.fromJson(Map<String, dynamic> json) => FluffyVisible(
+        href: json["href"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "href": href,
+    };
+}
+
+enum ModifyingViewUid {
+    S6_EW_H6_MP
+}
+
+final modifyingViewUidValues = EnumValues({
+    "s6ew-h6mp": ModifyingViewUid.S6_EW_H6_MP
+});
+
+class Owner {
+    final String displayName;
+    final List<String>? flags;
+    final String id;
+    final int? lastNotificationSeenAt;
+    final String? profileImageUrlLarge;
+    final String? profileImageUrlMedium;
+    final String? profileImageUrlSmall;
+    final List<String>? rights;
+    final RoleName? roleName;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        this.flags,
+        required this.id,
+        this.lastNotificationSeenAt,
+        this.profileImageUrlLarge,
+        this.profileImageUrlMedium,
+        this.profileImageUrlSmall,
+        this.rights,
+        this.roleName,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        id: json["id"],
+        lastNotificationSeenAt: json["lastNotificationSeenAt"],
+        profileImageUrlLarge: json["profileImageUrlLarge"],
+        profileImageUrlMedium: json["profileImageUrlMedium"],
+        profileImageUrlSmall: json["profileImageUrlSmall"],
+        rights: json["rights"] == null ? null : List<String>.from(json["rights"]!.map((x) => x)),
+        roleName: roleNameValues.map[json["roleName"]],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "id": id,
+        "lastNotificationSeenAt": lastNotificationSeenAt,
+        "profileImageUrlLarge": profileImageUrlLarge,
+        "profileImageUrlMedium": profileImageUrlMedium,
+        "profileImageUrlSmall": profileImageUrlSmall,
+        "rights": rights == null ? null : List<dynamic>.from(rights!.map((x) => x)),
+        "roleName": roleNameValues.reverse[roleName],
+        "screenName": screenName,
+    };
+}
+
+enum RoleName {
+    ADMINISTRATOR,
+    PUBLISHER
+}
+
+final roleNameValues = EnumValues({
+    "administrator": RoleName.ADMINISTRATOR,
+    "publisher": RoleName.PUBLISHER
+});
+
+enum Provenance {
+    OFFICIAL
+}
+
+final provenanceValues = EnumValues({
+    "official": Provenance.OFFICIAL
+});
+
+enum PublicationStage {
+    PUBLISHED
+}
+
+final publicationStageValues = EnumValues({
+    "published": PublicationStage.PUBLISHED
+});
+
+class Ratings {
+    final int rating;
+
+    Ratings({
+        required this.rating,
+    });
+
+    factory Ratings.fromJson(Map<String, dynamic> json) => Ratings(
+        rating: json["rating"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "rating": rating,
+    };
+}
+
+enum Right {
+    READ
+}
+
+final rightValues = EnumValues({
+    "read": Right.READ
+});
+
+enum RowsUpdatedBy {
+    PJXG_VE4_M,
+    THE_54_A3_QYUN,
+    THE_9_E3_M_2843,
+    VVCA_FR6_G
+}
+
+final rowsUpdatedByValues = EnumValues({
+    "pjxg-ve4m": RowsUpdatedBy.PJXG_VE4_M,
+    "54a3-qyun": RowsUpdatedBy.THE_54_A3_QYUN,
+    "9e3m-2843": RowsUpdatedBy.THE_9_E3_M_2843,
+    "vvca-fr6g": RowsUpdatedBy.VVCA_FR6_G
+});
+
+class TableAuthor {
+    final String displayName;
+    final String id;
+    final List<String>? rights;
+    final RoleName? roleName;
+    final String screenName;
+
+    TableAuthor({
+        required this.displayName,
+        required this.id,
+        this.rights,
+        this.roleName,
+        required this.screenName,
+    });
+
+    factory TableAuthor.fromJson(Map<String, dynamic> json) => TableAuthor(
+        displayName: json["displayName"],
+        id: json["id"],
+        rights: json["rights"] == null ? null : List<String>.from(json["rights"]!.map((x) => x)),
+        roleName: roleNameValues.map[json["roleName"]],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "rights": rights == null ? null : List<dynamic>.from(rights!.map((x) => x)),
+        "roleName": roleNameValues.reverse[roleName],
+        "screenName": screenName,
+    };
+}
+
+enum ViewType {
+    TABULAR
+}
+
+final viewTypeValues = EnumValues({
+    "tabular": ViewType.TABULAR
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/ed095.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ed095.json/default/TopLevel.dart
new file mode 100644
index 0000000..90c0c60
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/ed095.json/default/TopLevel.dart
@@ -0,0 +1,9 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+Map<String, String> topLevelFromJson(String str) => Map.from(json.decode(str)).map((k, v) => MapEntry<String, String>(k, v));
+
+String topLevelToJson(Map<String, String> data) => json.encode(Map.from(data).map((k, v) => MapEntry<String, dynamic>(k, v)));
diff --git a/head/dart/test/inputs/json/misc/f22f5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f22f5.json/default/TopLevel.dart
new file mode 100644
index 0000000..fb4f6d0
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f22f5.json/default/TopLevel.dart
@@ -0,0 +1,391 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final TopLevelData data;
+    final String kind;
+
+    TopLevel({
+        required this.data,
+        required this.kind,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: TopLevelData.fromJson(json["data"]),
+        kind: json["kind"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kind,
+    };
+}
+
+class TopLevelData {
+    final String after;
+    final dynamic before;
+    final List<Child> children;
+    final String modhash;
+
+    TopLevelData({
+        required this.after,
+        required this.before,
+        required this.children,
+        required this.modhash,
+    });
+
+    factory TopLevelData.fromJson(Map<String, dynamic> json) => TopLevelData(
+        after: json["after"],
+        before: json["before"],
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        modhash: json["modhash"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "after": after,
+        "before": before,
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "modhash": modhash,
+    };
+}
+
+class Child {
+    final ChildData data;
+    final Kind kind;
+
+    Child({
+        required this.data,
+        required this.kind,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        data: ChildData.fromJson(json["data"]),
+        kind: kindValues.map[json["kind"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": data.toJson(),
+        "kind": kindValues.reverse[kind],
+    };
+}
+
+class ChildData {
+    final dynamic approvedAtUtc;
+    final dynamic approvedBy;
+    final bool archived;
+    final String author;
+    final dynamic authorFlairCssClass;
+    final dynamic authorFlairText;
+    final dynamic bannedAtUtc;
+    final dynamic bannedBy;
+    final bool brandSafe;
+    final bool canGild;
+    final bool canModPost;
+    final bool clicked;
+    final bool contestMode;
+    final double created;
+    final double createdUtc;
+    final dynamic distinguished;
+    final String domain;
+    final int downs;
+    final bool edited;
+    final int gilded;
+    final bool hidden;
+    final bool hideScore;
+    final String id;
+    final bool isSelf;
+    final bool isVideo;
+    final dynamic likes;
+    final String? linkFlairCssClass;
+    final String? linkFlairText;
+    final bool locked;
+    final dynamic media;
+    final MediaEmbed mediaEmbed;
+    final List<dynamic> modReports;
+    final String name;
+    final int numComments;
+    final dynamic numReports;
+    final bool over18;
+    final String permalink;
+    final bool quarantine;
+    final dynamic removalReason;
+    final dynamic reportReasons;
+    final bool saved;
+    final int score;
+    final dynamic secureMedia;
+    final MediaEmbed secureMediaEmbed;
+    final String selftext;
+    final dynamic selftextHtml;
+    final bool spoiler;
+    final bool stickied;
+    final Subreddit subreddit;
+    final SubredditId subredditId;
+    final SubredditNamePrefixed subredditNamePrefixed;
+    final SubredditType subredditType;
+    final dynamic suggestedSort;
+    final String thumbnail;
+    final String title;
+    final int ups;
+    final String url;
+    final List<dynamic> userReports;
+    final dynamic viewCount;
+    final bool visited;
+
+    ChildData({
+        required this.approvedAtUtc,
+        required this.approvedBy,
+        required this.archived,
+        required this.author,
+        required this.authorFlairCssClass,
+        required this.authorFlairText,
+        required this.bannedAtUtc,
+        required this.bannedBy,
+        required this.brandSafe,
+        required this.canGild,
+        required this.canModPost,
+        required this.clicked,
+        required this.contestMode,
+        required this.created,
+        required this.createdUtc,
+        required this.distinguished,
+        required this.domain,
+        required this.downs,
+        required this.edited,
+        required this.gilded,
+        required this.hidden,
+        required this.hideScore,
+        required this.id,
+        required this.isSelf,
+        required this.isVideo,
+        required this.likes,
+        required this.linkFlairCssClass,
+        required this.linkFlairText,
+        required this.locked,
+        required this.media,
+        required this.mediaEmbed,
+        required this.modReports,
+        required this.name,
+        required this.numComments,
+        required this.numReports,
+        required this.over18,
+        required this.permalink,
+        required this.quarantine,
+        required this.removalReason,
+        required this.reportReasons,
+        required this.saved,
+        required this.score,
+        required this.secureMedia,
+        required this.secureMediaEmbed,
+        required this.selftext,
+        required this.selftextHtml,
+        required this.spoiler,
+        required this.stickied,
+        required this.subreddit,
+        required this.subredditId,
+        required this.subredditNamePrefixed,
+        required this.subredditType,
+        required this.suggestedSort,
+        required this.thumbnail,
+        required this.title,
+        required this.ups,
+        required this.url,
+        required this.userReports,
+        required this.viewCount,
+        required this.visited,
+    });
+
+    factory ChildData.fromJson(Map<String, dynamic> json) => ChildData(
+        approvedAtUtc: json["approved_at_utc"],
+        approvedBy: json["approved_by"],
+        archived: json["archived"],
+        author: json["author"],
+        authorFlairCssClass: json["author_flair_css_class"],
+        authorFlairText: json["author_flair_text"],
+        bannedAtUtc: json["banned_at_utc"],
+        bannedBy: json["banned_by"],
+        brandSafe: json["brand_safe"],
+        canGild: json["can_gild"],
+        canModPost: json["can_mod_post"],
+        clicked: json["clicked"],
+        contestMode: json["contest_mode"],
+        created: json["created"]?.toDouble(),
+        createdUtc: json["created_utc"]?.toDouble(),
+        distinguished: json["distinguished"],
+        domain: json["domain"],
+        downs: json["downs"],
+        edited: json["edited"],
+        gilded: json["gilded"],
+        hidden: json["hidden"],
+        hideScore: json["hide_score"],
+        id: json["id"],
+        isSelf: json["is_self"],
+        isVideo: json["is_video"],
+        likes: json["likes"],
+        linkFlairCssClass: json["link_flair_css_class"],
+        linkFlairText: json["link_flair_text"],
+        locked: json["locked"],
+        media: json["media"],
+        mediaEmbed: MediaEmbed.fromJson(json["media_embed"]),
+        modReports: List<dynamic>.from(json["mod_reports"].map((x) => x)),
+        name: json["name"],
+        numComments: json["num_comments"],
+        numReports: json["num_reports"],
+        over18: json["over_18"],
+        permalink: json["permalink"],
+        quarantine: json["quarantine"],
+        removalReason: json["removal_reason"],
+        reportReasons: json["report_reasons"],
+        saved: json["saved"],
+        score: json["score"],
+        secureMedia: json["secure_media"],
+        secureMediaEmbed: MediaEmbed.fromJson(json["secure_media_embed"]),
+        selftext: json["selftext"],
+        selftextHtml: json["selftext_html"],
+        spoiler: json["spoiler"],
+        stickied: json["stickied"],
+        subreddit: subredditValues.map[json["subreddit"]]!,
+        subredditId: subredditIdValues.map[json["subreddit_id"]]!,
+        subredditNamePrefixed: subredditNamePrefixedValues.map[json["subreddit_name_prefixed"]]!,
+        subredditType: subredditTypeValues.map[json["subreddit_type"]]!,
+        suggestedSort: json["suggested_sort"],
+        thumbnail: json["thumbnail"],
+        title: json["title"],
+        ups: json["ups"],
+        url: json["url"],
+        userReports: List<dynamic>.from(json["user_reports"].map((x) => x)),
+        viewCount: json["view_count"],
+        visited: json["visited"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "approved_at_utc": approvedAtUtc,
+        "approved_by": approvedBy,
+        "archived": archived,
+        "author": author,
+        "author_flair_css_class": authorFlairCssClass,
+        "author_flair_text": authorFlairText,
+        "banned_at_utc": bannedAtUtc,
+        "banned_by": bannedBy,
+        "brand_safe": brandSafe,
+        "can_gild": canGild,
+        "can_mod_post": canModPost,
+        "clicked": clicked,
+        "contest_mode": contestMode,
+        "created": created,
+        "created_utc": createdUtc,
+        "distinguished": distinguished,
+        "domain": domain,
+        "downs": downs,
+        "edited": edited,
+        "gilded": gilded,
+        "hidden": hidden,
+        "hide_score": hideScore,
+        "id": id,
+        "is_self": isSelf,
+        "is_video": isVideo,
+        "likes": likes,
+        "link_flair_css_class": linkFlairCssClass,
+        "link_flair_text": linkFlairText,
+        "locked": locked,
+        "media": media,
+        "media_embed": mediaEmbed.toJson(),
+        "mod_reports": List<dynamic>.from(modReports.map((x) => x)),
+        "name": name,
+        "num_comments": numComments,
+        "num_reports": numReports,
+        "over_18": over18,
+        "permalink": permalink,
+        "quarantine": quarantine,
+        "removal_reason": removalReason,
+        "report_reasons": reportReasons,
+        "saved": saved,
+        "score": score,
+        "secure_media": secureMedia,
+        "secure_media_embed": secureMediaEmbed.toJson(),
+        "selftext": selftext,
+        "selftext_html": selftextHtml,
+        "spoiler": spoiler,
+        "stickied": stickied,
+        "subreddit": subredditValues.reverse[subreddit],
+        "subreddit_id": subredditIdValues.reverse[subredditId],
+        "subreddit_name_prefixed": subredditNamePrefixedValues.reverse[subredditNamePrefixed],
+        "subreddit_type": subredditTypeValues.reverse[subredditType],
+        "suggested_sort": suggestedSort,
+        "thumbnail": thumbnail,
+        "title": title,
+        "ups": ups,
+        "url": url,
+        "user_reports": List<dynamic>.from(userReports.map((x) => x)),
+        "view_count": viewCount,
+        "visited": visited,
+    };
+}
+
+class MediaEmbed {
+    MediaEmbed();
+
+    factory MediaEmbed.fromJson(Map<String, dynamic> json) => MediaEmbed(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+enum Subreddit {
+    WORLDNEWS
+}
+
+final subredditValues = EnumValues({
+    "worldnews": Subreddit.WORLDNEWS
+});
+
+enum SubredditId {
+    T5_2_QH13
+}
+
+final subredditIdValues = EnumValues({
+    "t5_2qh13": SubredditId.T5_2_QH13
+});
+
+enum SubredditNamePrefixed {
+    R_WORLDNEWS
+}
+
+final subredditNamePrefixedValues = EnumValues({
+    "r/worldnews": SubredditNamePrefixed.R_WORLDNEWS
+});
+
+enum SubredditType {
+    PUBLIC
+}
+
+final subredditTypeValues = EnumValues({
+    "public": SubredditType.PUBLIC
+});
+
+enum Kind {
+    T3
+}
+
+final kindValues = EnumValues({
+    "t3": Kind.T3
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/f3139.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f3139.json/default/TopLevel.dart
new file mode 100644
index 0000000..2e634bc
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f3139.json/default/TopLevel.dart
@@ -0,0 +1,29 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final String id;
+    final String name;
+
+    TopLevel({
+        required this.id,
+        required this.name,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        id: json["id"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "id": id,
+        "name": name,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/f3edf.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f3edf.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f3edf.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/f466a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f466a.json/default/TopLevel.dart
new file mode 100644
index 0000000..9cc8557
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f466a.json/default/TopLevel.dart
@@ -0,0 +1,65 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+List<TopLevel> topLevelFromJson(String str) => List<TopLevel>.from(json.decode(str).map((x) => TopLevel.fromJson(x)));
+
+String topLevelToJson(List<TopLevel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
+
+class TopLevel {
+    final int age;
+    final Country country;
+    final int females;
+    final int males;
+    final int total;
+    final int year;
+
+    TopLevel({
+        required this.age,
+        required this.country,
+        required this.females,
+        required this.males,
+        required this.total,
+        required this.year,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        age: json["age"],
+        country: countryValues.map[json["country"]]!,
+        females: json["females"],
+        males: json["males"],
+        total: json["total"],
+        year: json["year"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "age": age,
+        "country": countryValues.reverse[country],
+        "females": females,
+        "males": males,
+        "total": total,
+        "year": year,
+    };
+}
+
+enum Country {
+    UNITED_STATES
+}
+
+final countryValues = EnumValues({
+    "United States": Country.UNITED_STATES
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/f6a65.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f6a65.json/default/TopLevel.dart
new file mode 100644
index 0000000..d95ea20
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f6a65.json/default/TopLevel.dart
@@ -0,0 +1,481 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<Datum> data;
+    final Meta meta;
+    final Pagination pagination;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+        required this.pagination,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
+        meta: Meta.fromJson(json["meta"]),
+        pagination: Pagination.fromJson(json["pagination"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => x.toJson())),
+        "meta": meta.toJson(),
+        "pagination": pagination.toJson(),
+    };
+}
+
+class Datum {
+    final String bitlyGifUrl;
+    final String bitlyUrl;
+    final String contentUrl;
+    final String embedUrl;
+    final String id;
+    final Images images;
+    final String importDatetime;
+    final int isIndexable;
+    final Rating rating;
+    final String slug;
+    final String source;
+    final String sourcePostUrl;
+    final String sourceTld;
+    final String trendingDatetime;
+    final Type type;
+    final String url;
+    final User? user;
+    final Username username;
+
+    Datum({
+        required this.bitlyGifUrl,
+        required this.bitlyUrl,
+        required this.contentUrl,
+        required this.embedUrl,
+        required this.id,
+        required this.images,
+        required this.importDatetime,
+        required this.isIndexable,
+        required this.rating,
+        required this.slug,
+        required this.source,
+        required this.sourcePostUrl,
+        required this.sourceTld,
+        required this.trendingDatetime,
+        required this.type,
+        required this.url,
+        this.user,
+        required this.username,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        bitlyGifUrl: json["bitly_gif_url"],
+        bitlyUrl: json["bitly_url"],
+        contentUrl: json["content_url"],
+        embedUrl: json["embed_url"],
+        id: json["id"],
+        images: Images.fromJson(json["images"]),
+        importDatetime: json["import_datetime"],
+        isIndexable: json["is_indexable"],
+        rating: ratingValues.map[json["rating"]]!,
+        slug: json["slug"],
+        source: json["source"],
+        sourcePostUrl: json["source_post_url"],
+        sourceTld: json["source_tld"],
+        trendingDatetime: json["trending_datetime"],
+        type: typeValues.map[json["type"]]!,
+        url: json["url"],
+        user: json["user"] == null ? null : User.fromJson(json["user"]),
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bitly_gif_url": bitlyGifUrl,
+        "bitly_url": bitlyUrl,
+        "content_url": contentUrl,
+        "embed_url": embedUrl,
+        "id": id,
+        "images": images.toJson(),
+        "import_datetime": importDatetime,
+        "is_indexable": isIndexable,
+        "rating": ratingValues.reverse[rating],
+        "slug": slug,
+        "source": source,
+        "source_post_url": sourcePostUrl,
+        "source_tld": sourceTld,
+        "trending_datetime": trendingDatetime,
+        "type": typeValues.reverse[type],
+        "url": url,
+        "user": user?.toJson(),
+        "username": usernameValues.reverse[username],
+    };
+}
+
+class Images {
+    final Downsized downsized;
+    final Downsized downsizedLarge;
+    final Downsized downsizedMedium;
+    final DownsizedSmall downsizedSmall;
+    final Downsized downsizedStill;
+    final FixedHeight fixedHeight;
+    final FixedHeight fixedHeightDownsampled;
+    final FixedHeight fixedHeightSmall;
+    final Downsized fixedHeightSmallStill;
+    final Downsized fixedHeightStill;
+    final FixedHeight fixedWidth;
+    final FixedHeight fixedWidthDownsampled;
+    final FixedHeight fixedWidthSmall;
+    final Downsized fixedWidthSmallStill;
+    final Downsized fixedWidthStill;
+    final Looping looping;
+    final FixedHeight original;
+    final DownsizedSmall originalMp4;
+    final Downsized originalStill;
+    final DownsizedSmall preview;
+    final Downsized previewGif;
+    final Downsized previewWebp;
+    final Downsized? the480WStill;
+
+    Images({
+        required this.downsized,
+        required this.downsizedLarge,
+        required this.downsizedMedium,
+        required this.downsizedSmall,
+        required this.downsizedStill,
+        required this.fixedHeight,
+        required this.fixedHeightDownsampled,
+        required this.fixedHeightSmall,
+        required this.fixedHeightSmallStill,
+        required this.fixedHeightStill,
+        required this.fixedWidth,
+        required this.fixedWidthDownsampled,
+        required this.fixedWidthSmall,
+        required this.fixedWidthSmallStill,
+        required this.fixedWidthStill,
+        required this.looping,
+        required this.original,
+        required this.originalMp4,
+        required this.originalStill,
+        required this.preview,
+        required this.previewGif,
+        required this.previewWebp,
+        this.the480WStill,
+    });
+
+    factory Images.fromJson(Map<String, dynamic> json) => Images(
+        downsized: Downsized.fromJson(json["downsized"]),
+        downsizedLarge: Downsized.fromJson(json["downsized_large"]),
+        downsizedMedium: Downsized.fromJson(json["downsized_medium"]),
+        downsizedSmall: DownsizedSmall.fromJson(json["downsized_small"]),
+        downsizedStill: Downsized.fromJson(json["downsized_still"]),
+        fixedHeight: FixedHeight.fromJson(json["fixed_height"]),
+        fixedHeightDownsampled: FixedHeight.fromJson(json["fixed_height_downsampled"]),
+        fixedHeightSmall: FixedHeight.fromJson(json["fixed_height_small"]),
+        fixedHeightSmallStill: Downsized.fromJson(json["fixed_height_small_still"]),
+        fixedHeightStill: Downsized.fromJson(json["fixed_height_still"]),
+        fixedWidth: FixedHeight.fromJson(json["fixed_width"]),
+        fixedWidthDownsampled: FixedHeight.fromJson(json["fixed_width_downsampled"]),
+        fixedWidthSmall: FixedHeight.fromJson(json["fixed_width_small"]),
+        fixedWidthSmallStill: Downsized.fromJson(json["fixed_width_small_still"]),
+        fixedWidthStill: Downsized.fromJson(json["fixed_width_still"]),
+        looping: Looping.fromJson(json["looping"]),
+        original: FixedHeight.fromJson(json["original"]),
+        originalMp4: DownsizedSmall.fromJson(json["original_mp4"]),
+        originalStill: Downsized.fromJson(json["original_still"]),
+        preview: DownsizedSmall.fromJson(json["preview"]),
+        previewGif: Downsized.fromJson(json["preview_gif"]),
+        previewWebp: Downsized.fromJson(json["preview_webp"]),
+        the480WStill: json["480w_still"] == null ? null : Downsized.fromJson(json["480w_still"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "downsized": downsized.toJson(),
+        "downsized_large": downsizedLarge.toJson(),
+        "downsized_medium": downsizedMedium.toJson(),
+        "downsized_small": downsizedSmall.toJson(),
+        "downsized_still": downsizedStill.toJson(),
+        "fixed_height": fixedHeight.toJson(),
+        "fixed_height_downsampled": fixedHeightDownsampled.toJson(),
+        "fixed_height_small": fixedHeightSmall.toJson(),
+        "fixed_height_small_still": fixedHeightSmallStill.toJson(),
+        "fixed_height_still": fixedHeightStill.toJson(),
+        "fixed_width": fixedWidth.toJson(),
+        "fixed_width_downsampled": fixedWidthDownsampled.toJson(),
+        "fixed_width_small": fixedWidthSmall.toJson(),
+        "fixed_width_small_still": fixedWidthSmallStill.toJson(),
+        "fixed_width_still": fixedWidthStill.toJson(),
+        "looping": looping.toJson(),
+        "original": original.toJson(),
+        "original_mp4": originalMp4.toJson(),
+        "original_still": originalStill.toJson(),
+        "preview": preview.toJson(),
+        "preview_gif": previewGif.toJson(),
+        "preview_webp": previewWebp.toJson(),
+        "480w_still": the480WStill?.toJson(),
+    };
+}
+
+class Downsized {
+    final String height;
+    final String? size;
+    final String url;
+    final String width;
+
+    Downsized({
+        required this.height,
+        this.size,
+        required this.url,
+        required this.width,
+    });
+
+    factory Downsized.fromJson(Map<String, dynamic> json) => Downsized(
+        height: json["height"],
+        size: json["size"],
+        url: json["url"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "size": size,
+        "url": url,
+        "width": width,
+    };
+}
+
+class DownsizedSmall {
+    final String height;
+    final String mp4;
+    final String mp4Size;
+    final String width;
+
+    DownsizedSmall({
+        required this.height,
+        required this.mp4,
+        required this.mp4Size,
+        required this.width,
+    });
+
+    factory DownsizedSmall.fromJson(Map<String, dynamic> json) => DownsizedSmall(
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "width": width,
+    };
+}
+
+class FixedHeight {
+    final String? frames;
+    final String? hash;
+    final String height;
+    final String? mp4;
+    final String? mp4Size;
+    final String size;
+    final String url;
+    final String webp;
+    final String webpSize;
+    final String width;
+
+    FixedHeight({
+        this.frames,
+        this.hash,
+        required this.height,
+        this.mp4,
+        this.mp4Size,
+        required this.size,
+        required this.url,
+        required this.webp,
+        required this.webpSize,
+        required this.width,
+    });
+
+    factory FixedHeight.fromJson(Map<String, dynamic> json) => FixedHeight(
+        frames: json["frames"],
+        hash: json["hash"],
+        height: json["height"],
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+        size: json["size"],
+        url: json["url"],
+        webp: json["webp"],
+        webpSize: json["webp_size"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "frames": frames,
+        "hash": hash,
+        "height": height,
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+        "size": size,
+        "url": url,
+        "webp": webp,
+        "webp_size": webpSize,
+        "width": width,
+    };
+}
+
+class Looping {
+    final String mp4;
+    final String mp4Size;
+
+    Looping({
+        required this.mp4,
+        required this.mp4Size,
+    });
+
+    factory Looping.fromJson(Map<String, dynamic> json) => Looping(
+        mp4: json["mp4"],
+        mp4Size: json["mp4_size"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "mp4": mp4,
+        "mp4_size": mp4Size,
+    };
+}
+
+enum Rating {
+    G,
+    Y,
+    PG,
+    PG_13
+}
+
+final ratingValues = EnumValues({
+    "g": Rating.G,
+    "y": Rating.Y,
+    "pg": Rating.PG,
+    "pg-13": Rating.PG_13
+});
+
+enum Type {
+    GIF
+}
+
+final typeValues = EnumValues({
+    "gif": Type.GIF
+});
+
+class User {
+    final String avatarUrl;
+    final String bannerUrl;
+    final String displayName;
+    final String profileUrl;
+    final String twitter;
+    final Username username;
+
+    User({
+        required this.avatarUrl,
+        required this.bannerUrl,
+        required this.displayName,
+        required this.profileUrl,
+        required this.twitter,
+        required this.username,
+    });
+
+    factory User.fromJson(Map<String, dynamic> json) => User(
+        avatarUrl: json["avatar_url"],
+        bannerUrl: json["banner_url"],
+        displayName: json["display_name"],
+        profileUrl: json["profile_url"],
+        twitter: json["twitter"],
+        username: usernameValues.map[json["username"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "avatar_url": avatarUrl,
+        "banner_url": bannerUrl,
+        "display_name": displayName,
+        "profile_url": profileUrl,
+        "twitter": twitter,
+        "username": usernameValues.reverse[username],
+    };
+}
+
+enum Username {
+    EMPTY,
+    PRODUCTHUNT,
+    MEETAIKO,
+    CHEEZBURGER
+}
+
+final usernameValues = EnumValues({
+    "": Username.EMPTY,
+    "producthunt": Username.PRODUCTHUNT,
+    "meetaiko": Username.MEETAIKO,
+    "cheezburger": Username.CHEEZBURGER
+});
+
+class Meta {
+    final String msg;
+    final String responseId;
+    final int status;
+
+    Meta({
+        required this.msg,
+        required this.responseId,
+        required this.status,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        msg: json["msg"],
+        responseId: json["response_id"],
+        status: json["status"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "msg": msg,
+        "response_id": responseId,
+        "status": status,
+    };
+}
+
+class Pagination {
+    final int count;
+    final int offset;
+    final int totalCount;
+
+    Pagination({
+        required this.count,
+        required this.offset,
+        required this.totalCount,
+    });
+
+    factory Pagination.fromJson(Map<String, dynamic> json) => Pagination(
+        count: json["count"],
+        offset: json["offset"],
+        totalCount: json["total_count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "offset": offset,
+        "total_count": totalCount,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/f74d5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f74d5.json/default/TopLevel.dart
new file mode 100644
index 0000000..9f622b0
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f74d5.json/default/TopLevel.dart
@@ -0,0 +1,483 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final License license;
+    final String licenseId;
+    final String locale;
+    final Metadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final String rowClass;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.license,
+        required this.licenseId,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowClass,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        license: License.fromJson(json["license"]),
+        licenseId: json["licenseId"],
+        locale: json["locale"],
+        metadata: Metadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowClass: json["rowClass"],
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "license": license.toJson(),
+        "licenseId": licenseId,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowClass": rowClass,
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final TypeName dataTypeName;
+    final String fieldName;
+    final List<String>? flags;
+    final Query format;
+    final int id;
+    final String name;
+    final int position;
+    final TypeName renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: typeNameValues.map[json["dataTypeName"]]!,
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Query.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: typeNameValues.map[json["renderTypeName"]]!,
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": typeNameValues.reverse[dataTypeName],
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": typeNameValues.reverse[renderTypeName],
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final String? average;
+    final int cachedContentsNull;
+    final String largest;
+    final int nonNull;
+    final String smallest;
+    final String? sum;
+    final List<Top> top;
+
+    CachedContents({
+        this.average,
+        required this.cachedContentsNull,
+        required this.largest,
+        required this.nonNull,
+        required this.smallest,
+        this.sum,
+        required this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        average: json["average"],
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        sum: json["sum"],
+        top: List<Top>.from(json["top"].map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "average": average,
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "sum": sum,
+        "top": List<dynamic>.from(top.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+enum TypeName {
+    META_DATA,
+    NUMBER,
+    TEXT
+}
+
+final typeNameValues = EnumValues({
+    "meta_data": TypeName.META_DATA,
+    "number": TypeName.NUMBER,
+    "text": TypeName.TEXT
+});
+
+class Query {
+    Query();
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+    );
+
+    Map<String, dynamic> toJson() => {
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class License {
+    final String name;
+
+    License({
+        required this.name,
+    });
+
+    factory License.fromJson(Map<String, dynamic> json) => License(
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "name": name,
+    };
+}
+
+class Metadata {
+    final List<String> availableDisplayTypes;
+    final String rdfClass;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+    final String rowIdentifier;
+
+    Metadata({
+        required this.availableDisplayTypes,
+        required this.rdfClass,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+        required this.rowIdentifier,
+    });
+
+    factory Metadata.fromJson(Map<String, dynamic> json) => Metadata(
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        rdfClass: json["rdfClass"],
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+        rowIdentifier: json["rowIdentifier"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "rdfClass": rdfClass,
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+        "rowIdentifier": rowIdentifier,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "screenName": screenName,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/f82d9.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f82d9.json/default/TopLevel.dart
new file mode 100644
index 0000000..7dd552d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f82d9.json/default/TopLevel.dart
@@ -0,0 +1,373 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String basePath;
+    final Definitions definitions;
+    final String host;
+    final Info info;
+    final Paths paths;
+    final List<String> produces;
+    final List<String> schemes;
+    final String swagger;
+
+    TopLevel({
+        required this.basePath,
+        required this.definitions,
+        required this.host,
+        required this.info,
+        required this.paths,
+        required this.produces,
+        required this.schemes,
+        required this.swagger,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        basePath: json["basePath"],
+        definitions: Definitions.fromJson(json["definitions"]),
+        host: json["host"],
+        info: Info.fromJson(json["info"]),
+        paths: Paths.fromJson(json["paths"]),
+        produces: List<String>.from(json["produces"].map((x) => x)),
+        schemes: List<String>.from(json["schemes"].map((x) => x)),
+        swagger: json["swagger"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "basePath": basePath,
+        "definitions": definitions.toJson(),
+        "host": host,
+        "info": info.toJson(),
+        "paths": paths.toJson(),
+        "produces": List<dynamic>.from(produces.map((x) => x)),
+        "schemes": List<dynamic>.from(schemes.map((x) => x)),
+        "swagger": swagger,
+    };
+}
+
+class Definitions {
+    final Report report;
+
+    Definitions({
+        required this.report,
+    });
+
+    factory Definitions.fromJson(Map<String, dynamic> json) => Definitions(
+        report: Report.fromJson(json["Report"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Report": report.toJson(),
+    };
+}
+
+class Report {
+    final Properties properties;
+
+    Report({
+        required this.properties,
+    });
+
+    factory Report.fromJson(Map<String, dynamic> json) => Report(
+        properties: Properties.fromJson(json["properties"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "properties": properties.toJson(),
+    };
+}
+
+class Properties {
+    final ClickUrl clickUrl;
+    final ClickUrl country;
+    final ClickUrl description;
+    final ClickUrl expirationDate;
+    final ClickUrl id;
+    final ClickUrl industry;
+    final ClickUrl reportType;
+    final ClickUrl sourceIndustry;
+    final ClickUrl title;
+    final ClickUrl url;
+
+    Properties({
+        required this.clickUrl,
+        required this.country,
+        required this.description,
+        required this.expirationDate,
+        required this.id,
+        required this.industry,
+        required this.reportType,
+        required this.sourceIndustry,
+        required this.title,
+        required this.url,
+    });
+
+    factory Properties.fromJson(Map<String, dynamic> json) => Properties(
+        clickUrl: ClickUrl.fromJson(json["click_url"]),
+        country: ClickUrl.fromJson(json["country"]),
+        description: ClickUrl.fromJson(json["description"]),
+        expirationDate: ClickUrl.fromJson(json["expiration_date"]),
+        id: ClickUrl.fromJson(json["id"]),
+        industry: ClickUrl.fromJson(json["industry"]),
+        reportType: ClickUrl.fromJson(json["report_type"]),
+        sourceIndustry: ClickUrl.fromJson(json["source_industry"]),
+        title: ClickUrl.fromJson(json["title"]),
+        url: ClickUrl.fromJson(json["url"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "click_url": clickUrl.toJson(),
+        "country": country.toJson(),
+        "description": description.toJson(),
+        "expiration_date": expirationDate.toJson(),
+        "id": id.toJson(),
+        "industry": industry.toJson(),
+        "report_type": reportType.toJson(),
+        "source_industry": sourceIndustry.toJson(),
+        "title": title.toJson(),
+        "url": url.toJson(),
+    };
+}
+
+class ClickUrl {
+    final String description;
+    final Type type;
+
+    ClickUrl({
+        required this.description,
+        required this.type,
+    });
+
+    factory ClickUrl.fromJson(Map<String, dynamic> json) => ClickUrl(
+        description: json["description"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "type": typeValues.reverse[type],
+    };
+}
+
+enum Type {
+    STRING
+}
+
+final typeValues = EnumValues({
+    "string": Type.STRING
+});
+
+class Info {
+    final String description;
+    final String title;
+    final String version;
+
+    Info({
+        required this.description,
+        required this.title,
+        required this.version,
+    });
+
+    factory Info.fromJson(Map<String, dynamic> json) => Info(
+        description: json["description"],
+        title: json["title"],
+        version: json["version"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "title": title,
+        "version": version,
+    };
+}
+
+class Paths {
+    final MarketResearchLibrarySearch marketResearchLibrarySearch;
+
+    Paths({
+        required this.marketResearchLibrarySearch,
+    });
+
+    factory Paths.fromJson(Map<String, dynamic> json) => Paths(
+        marketResearchLibrarySearch: MarketResearchLibrarySearch.fromJson(json["/market_research_library/search"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "/market_research_library/search": marketResearchLibrarySearch.toJson(),
+    };
+}
+
+class MarketResearchLibrarySearch {
+    final Get marketResearchLibrarySearchGet;
+
+    MarketResearchLibrarySearch({
+        required this.marketResearchLibrarySearchGet,
+    });
+
+    factory MarketResearchLibrarySearch.fromJson(Map<String, dynamic> json) => MarketResearchLibrarySearch(
+        marketResearchLibrarySearchGet: Get.fromJson(json["get"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "get": marketResearchLibrarySearchGet.toJson(),
+    };
+}
+
+class Get {
+    final String description;
+    final List<Parameter> parameters;
+    final Responses responses;
+    final String summary;
+    final List<String> tags;
+
+    Get({
+        required this.description,
+        required this.parameters,
+        required this.responses,
+        required this.summary,
+        required this.tags,
+    });
+
+    factory Get.fromJson(Map<String, dynamic> json) => Get(
+        description: json["description"],
+        parameters: List<Parameter>.from(json["parameters"].map((x) => Parameter.fromJson(x))),
+        responses: Responses.fromJson(json["responses"]),
+        summary: json["summary"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "parameters": List<dynamic>.from(parameters.map((x) => x.toJson())),
+        "responses": responses.toJson(),
+        "summary": summary,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+    };
+}
+
+class Parameter {
+    final String description;
+    final Type format;
+    final String name;
+    final String parameterIn;
+    final bool required;
+    final Type type;
+
+    Parameter({
+        required this.description,
+        required this.format,
+        required this.name,
+        required this.parameterIn,
+        required this.required,
+        required this.type,
+    });
+
+    factory Parameter.fromJson(Map<String, dynamic> json) => Parameter(
+        description: json["description"],
+        format: typeValues.map[json["format"]]!,
+        name: json["name"],
+        parameterIn: json["in"],
+        required: json["required"],
+        type: typeValues.map[json["type"]]!,
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "format": typeValues.reverse[format],
+        "name": name,
+        "in": parameterIn,
+        "required": required,
+        "type": typeValues.reverse[type],
+    };
+}
+
+class Responses {
+    final The200 the200;
+
+    Responses({
+        required this.the200,
+    });
+
+    factory Responses.fromJson(Map<String, dynamic> json) => Responses(
+        the200: The200.fromJson(json["200"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "200": the200.toJson(),
+    };
+}
+
+class The200 {
+    final String description;
+    final Schema schema;
+
+    The200({
+        required this.description,
+        required this.schema,
+    });
+
+    factory The200.fromJson(Map<String, dynamic> json) => The200(
+        description: json["description"],
+        schema: Schema.fromJson(json["schema"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "description": description,
+        "schema": schema.toJson(),
+    };
+}
+
+class Schema {
+    final Items items;
+    final String type;
+
+    Schema({
+        required this.items,
+        required this.type,
+    });
+
+    factory Schema.fromJson(Map<String, dynamic> json) => Schema(
+        items: Items.fromJson(json["items"]),
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "items": items.toJson(),
+        "type": type,
+    };
+}
+
+class Items {
+    final String ref;
+
+    Items({
+        required this.ref,
+    });
+
+    factory Items.fromJson(Map<String, dynamic> json) => Items(
+        ref: json["\u0024ref"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "\u0024ref": ref,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/f974d.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/f974d.json/default/TopLevel.dart
new file mode 100644
index 0000000..b097cd9
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/f974d.json/default/TopLevel.dart
@@ -0,0 +1,41 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final int blockIndex;
+    final String hash;
+    final int height;
+    final int time;
+    final List<int> txIndexes;
+
+    TopLevel({
+        required this.blockIndex,
+        required this.hash,
+        required this.height,
+        required this.time,
+        required this.txIndexes,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        blockIndex: json["block_index"],
+        hash: json["hash"],
+        height: json["height"],
+        time: json["time"],
+        txIndexes: List<int>.from(json["txIndexes"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "block_index": blockIndex,
+        "hash": hash,
+        "height": height,
+        "time": time,
+        "txIndexes": List<dynamic>.from(txIndexes.map((x) => x)),
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/faff5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/faff5.json/default/TopLevel.dart
new file mode 100644
index 0000000..afbd83b
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/faff5.json/default/TopLevel.dart
@@ -0,0 +1,45 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Response response;
+
+    TopLevel({
+        required this.response,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        response: Response.fromJson(json["response"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "response": response.toJson(),
+    };
+}
+
+class Response {
+    final int playerCount;
+    final int result;
+
+    Response({
+        required this.playerCount,
+        required this.result,
+    });
+
+    factory Response.fromJson(Map<String, dynamic> json) => Response(
+        playerCount: json["player_count"],
+        result: json["result"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "player_count": playerCount,
+        "result": result,
+    };
+}
diff --git a/head/dart/test/inputs/json/misc/fcca3.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/fcca3.json/default/TopLevel.dart
new file mode 100644
index 0000000..24c8a6d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/fcca3.json/default/TopLevel.dart
@@ -0,0 +1,873 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<List<dynamic>> data;
+    final Meta meta;
+
+    TopLevel({
+        required this.data,
+        required this.meta,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: List<List<dynamic>>.from(json["data"].map((x) => List<dynamic>.from(x.map((x) => x)))),
+        meta: Meta.fromJson(json["meta"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": List<dynamic>.from(data.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "meta": meta.toJson(),
+    };
+}
+
+class Meta {
+    final View view;
+
+    Meta({
+        required this.view,
+    });
+
+    factory Meta.fromJson(Map<String, dynamic> json) => Meta(
+        view: View.fromJson(json["view"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "view": view.toJson(),
+    };
+}
+
+class View {
+    final String attribution;
+    final int averageRating;
+    final String category;
+    final List<Column> columns;
+    final int createdAt;
+    final String description;
+    final String displayType;
+    final int downloadCount;
+    final List<String> flags;
+    final List<Grant> grants;
+    final bool hideFromCatalog;
+    final bool hideFromDataJson;
+    final String id;
+    final int indexUpdatedAt;
+    final String locale;
+    final ViewMetadata metadata;
+    final String name;
+    final bool newBackend;
+    final int numberOfComments;
+    final int oid;
+    final Owner owner;
+    final String provenance;
+    final bool publicationAppendEnabled;
+    final int publicationDate;
+    final int publicationGroup;
+    final String publicationStage;
+    final Query query;
+    final List<String> rights;
+    final int rowsUpdatedAt;
+    final String rowsUpdatedBy;
+    final Owner tableAuthor;
+    final int tableId;
+    final List<String> tags;
+    final int totalTimesRated;
+    final int viewCount;
+    final int viewLastModified;
+    final String viewType;
+
+    View({
+        required this.attribution,
+        required this.averageRating,
+        required this.category,
+        required this.columns,
+        required this.createdAt,
+        required this.description,
+        required this.displayType,
+        required this.downloadCount,
+        required this.flags,
+        required this.grants,
+        required this.hideFromCatalog,
+        required this.hideFromDataJson,
+        required this.id,
+        required this.indexUpdatedAt,
+        required this.locale,
+        required this.metadata,
+        required this.name,
+        required this.newBackend,
+        required this.numberOfComments,
+        required this.oid,
+        required this.owner,
+        required this.provenance,
+        required this.publicationAppendEnabled,
+        required this.publicationDate,
+        required this.publicationGroup,
+        required this.publicationStage,
+        required this.query,
+        required this.rights,
+        required this.rowsUpdatedAt,
+        required this.rowsUpdatedBy,
+        required this.tableAuthor,
+        required this.tableId,
+        required this.tags,
+        required this.totalTimesRated,
+        required this.viewCount,
+        required this.viewLastModified,
+        required this.viewType,
+    });
+
+    factory View.fromJson(Map<String, dynamic> json) => View(
+        attribution: json["attribution"],
+        averageRating: json["averageRating"],
+        category: json["category"],
+        columns: List<Column>.from(json["columns"].map((x) => Column.fromJson(x))),
+        createdAt: json["createdAt"],
+        description: json["description"],
+        displayType: json["displayType"],
+        downloadCount: json["downloadCount"],
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        grants: List<Grant>.from(json["grants"].map((x) => Grant.fromJson(x))),
+        hideFromCatalog: json["hideFromCatalog"],
+        hideFromDataJson: json["hideFromDataJson"],
+        id: json["id"],
+        indexUpdatedAt: json["indexUpdatedAt"],
+        locale: json["locale"],
+        metadata: ViewMetadata.fromJson(json["metadata"]),
+        name: json["name"],
+        newBackend: json["newBackend"],
+        numberOfComments: json["numberOfComments"],
+        oid: json["oid"],
+        owner: Owner.fromJson(json["owner"]),
+        provenance: json["provenance"],
+        publicationAppendEnabled: json["publicationAppendEnabled"],
+        publicationDate: json["publicationDate"],
+        publicationGroup: json["publicationGroup"],
+        publicationStage: json["publicationStage"],
+        query: Query.fromJson(json["query"]),
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        rowsUpdatedAt: json["rowsUpdatedAt"],
+        rowsUpdatedBy: json["rowsUpdatedBy"],
+        tableAuthor: Owner.fromJson(json["tableAuthor"]),
+        tableId: json["tableId"],
+        tags: List<String>.from(json["tags"].map((x) => x)),
+        totalTimesRated: json["totalTimesRated"],
+        viewCount: json["viewCount"],
+        viewLastModified: json["viewLastModified"],
+        viewType: json["viewType"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attribution": attribution,
+        "averageRating": averageRating,
+        "category": category,
+        "columns": List<dynamic>.from(columns.map((x) => x.toJson())),
+        "createdAt": createdAt,
+        "description": description,
+        "displayType": displayType,
+        "downloadCount": downloadCount,
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "grants": List<dynamic>.from(grants.map((x) => x.toJson())),
+        "hideFromCatalog": hideFromCatalog,
+        "hideFromDataJson": hideFromDataJson,
+        "id": id,
+        "indexUpdatedAt": indexUpdatedAt,
+        "locale": locale,
+        "metadata": metadata.toJson(),
+        "name": name,
+        "newBackend": newBackend,
+        "numberOfComments": numberOfComments,
+        "oid": oid,
+        "owner": owner.toJson(),
+        "provenance": provenance,
+        "publicationAppendEnabled": publicationAppendEnabled,
+        "publicationDate": publicationDate,
+        "publicationGroup": publicationGroup,
+        "publicationStage": publicationStage,
+        "query": query.toJson(),
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "rowsUpdatedAt": rowsUpdatedAt,
+        "rowsUpdatedBy": rowsUpdatedBy,
+        "tableAuthor": tableAuthor.toJson(),
+        "tableId": tableId,
+        "tags": List<dynamic>.from(tags.map((x) => x)),
+        "totalTimesRated": totalTimesRated,
+        "viewCount": viewCount,
+        "viewLastModified": viewLastModified,
+        "viewType": viewType,
+    };
+}
+
+class Column {
+    final CachedContents? cachedContents;
+    final TypeName dataTypeName;
+    final String? description;
+    final String fieldName;
+    final List<String>? flags;
+    final Format format;
+    final int id;
+    final String name;
+    final int position;
+    final TypeName renderTypeName;
+    final int? tableColumnId;
+    final int? width;
+
+    Column({
+        this.cachedContents,
+        required this.dataTypeName,
+        this.description,
+        required this.fieldName,
+        this.flags,
+        required this.format,
+        required this.id,
+        required this.name,
+        required this.position,
+        required this.renderTypeName,
+        this.tableColumnId,
+        this.width,
+    });
+
+    factory Column.fromJson(Map<String, dynamic> json) => Column(
+        cachedContents: json["cachedContents"] == null ? null : CachedContents.fromJson(json["cachedContents"]),
+        dataTypeName: typeNameValues.map[json["dataTypeName"]]!,
+        description: json["description"],
+        fieldName: json["fieldName"],
+        flags: json["flags"] == null ? null : List<String>.from(json["flags"]!.map((x) => x)),
+        format: Format.fromJson(json["format"]),
+        id: json["id"],
+        name: json["name"],
+        position: json["position"],
+        renderTypeName: typeNameValues.map[json["renderTypeName"]]!,
+        tableColumnId: json["tableColumnId"],
+        width: json["width"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "cachedContents": cachedContents?.toJson(),
+        "dataTypeName": typeNameValues.reverse[dataTypeName],
+        "description": description,
+        "fieldName": fieldName,
+        "flags": flags == null ? null : List<dynamic>.from(flags!.map((x) => x)),
+        "format": format.toJson(),
+        "id": id,
+        "name": name,
+        "position": position,
+        "renderTypeName": typeNameValues.reverse[renderTypeName],
+        "tableColumnId": tableColumnId,
+        "width": width,
+    };
+}
+
+class CachedContents {
+    final String? average;
+    final int cachedContentsNull;
+    final String largest;
+    final int nonNull;
+    final String smallest;
+    final String? sum;
+    final List<Top> top;
+
+    CachedContents({
+        this.average,
+        required this.cachedContentsNull,
+        required this.largest,
+        required this.nonNull,
+        required this.smallest,
+        this.sum,
+        required this.top,
+    });
+
+    factory CachedContents.fromJson(Map<String, dynamic> json) => CachedContents(
+        average: json["average"],
+        cachedContentsNull: json["null"],
+        largest: json["largest"],
+        nonNull: json["non_null"],
+        smallest: json["smallest"],
+        sum: json["sum"],
+        top: List<Top>.from(json["top"].map((x) => Top.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "average": average,
+        "null": cachedContentsNull,
+        "largest": largest,
+        "non_null": nonNull,
+        "smallest": smallest,
+        "sum": sum,
+        "top": List<dynamic>.from(top.map((x) => x.toJson())),
+    };
+}
+
+class Top {
+    final int count;
+    final String item;
+
+    Top({
+        required this.count,
+        required this.item,
+    });
+
+    factory Top.fromJson(Map<String, dynamic> json) => Top(
+        count: json["count"],
+        item: json["item"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+        "item": item,
+    };
+}
+
+enum TypeName {
+    META_DATA,
+    NUMBER,
+    TEXT
+}
+
+final typeNameValues = EnumValues({
+    "meta_data": TypeName.META_DATA,
+    "number": TypeName.NUMBER,
+    "text": TypeName.TEXT
+});
+
+class Format {
+    final String? align;
+    final String? noCommas;
+    final String? precisionStyle;
+
+    Format({
+        this.align,
+        this.noCommas,
+        this.precisionStyle,
+    });
+
+    factory Format.fromJson(Map<String, dynamic> json) => Format(
+        align: json["align"],
+        noCommas: json["noCommas"],
+        precisionStyle: json["precisionStyle"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "align": align,
+        "noCommas": noCommas,
+        "precisionStyle": precisionStyle,
+    };
+}
+
+class Grant {
+    final List<String> flags;
+    final bool inherited;
+    final String type;
+
+    Grant({
+        required this.flags,
+        required this.inherited,
+        required this.type,
+    });
+
+    factory Grant.fromJson(Map<String, dynamic> json) => Grant(
+        flags: List<String>.from(json["flags"].map((x) => x)),
+        inherited: json["inherited"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "flags": List<dynamic>.from(flags.map((x) => x)),
+        "inherited": inherited,
+        "type": type,
+    };
+}
+
+class ViewMetadata {
+    final List<Attachment> attachments;
+    final List<String> availableDisplayTypes;
+    final CustomFields customFields;
+    final FilterCondition filterCondition;
+    final JsonQuery jsonQuery;
+    final String rdfSubject;
+    final RenderTypeConfig renderTypeConfig;
+    final String rowLabel;
+
+    ViewMetadata({
+        required this.attachments,
+        required this.availableDisplayTypes,
+        required this.customFields,
+        required this.filterCondition,
+        required this.jsonQuery,
+        required this.rdfSubject,
+        required this.renderTypeConfig,
+        required this.rowLabel,
+    });
+
+    factory ViewMetadata.fromJson(Map<String, dynamic> json) => ViewMetadata(
+        attachments: List<Attachment>.from(json["attachments"].map((x) => Attachment.fromJson(x))),
+        availableDisplayTypes: List<String>.from(json["availableDisplayTypes"].map((x) => x)),
+        customFields: CustomFields.fromJson(json["custom_fields"]),
+        filterCondition: FilterCondition.fromJson(json["filterCondition"]),
+        jsonQuery: JsonQuery.fromJson(json["jsonQuery"]),
+        rdfSubject: json["rdfSubject"],
+        renderTypeConfig: RenderTypeConfig.fromJson(json["renderTypeConfig"]),
+        rowLabel: json["rowLabel"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "attachments": List<dynamic>.from(attachments.map((x) => x.toJson())),
+        "availableDisplayTypes": List<dynamic>.from(availableDisplayTypes.map((x) => x)),
+        "custom_fields": customFields.toJson(),
+        "filterCondition": filterCondition.toJson(),
+        "jsonQuery": jsonQuery.toJson(),
+        "rdfSubject": rdfSubject,
+        "renderTypeConfig": renderTypeConfig.toJson(),
+        "rowLabel": rowLabel,
+    };
+}
+
+class Attachment {
+    final String assetId;
+    final String blobId;
+    final String filename;
+    final String name;
+
+    Attachment({
+        required this.assetId,
+        required this.blobId,
+        required this.filename,
+        required this.name,
+    });
+
+    factory Attachment.fromJson(Map<String, dynamic> json) => Attachment(
+        assetId: json["assetId"],
+        blobId: json["blobId"],
+        filename: json["filename"],
+        name: json["name"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "assetId": assetId,
+        "blobId": blobId,
+        "filename": filename,
+        "name": name,
+    };
+}
+
+class CustomFields {
+    final CommonCore commonCore;
+    final DatasetInformation datasetInformation;
+    final DatasetSummary datasetSummary;
+    final Disclaimers disclaimers;
+
+    CustomFields({
+        required this.commonCore,
+        required this.datasetInformation,
+        required this.datasetSummary,
+        required this.disclaimers,
+    });
+
+    factory CustomFields.fromJson(Map<String, dynamic> json) => CustomFields(
+        commonCore: CommonCore.fromJson(json["Common Core"]),
+        datasetInformation: DatasetInformation.fromJson(json["Dataset Information"]),
+        datasetSummary: DatasetSummary.fromJson(json["Dataset Summary"]),
+        disclaimers: Disclaimers.fromJson(json["Disclaimers"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Common Core": commonCore.toJson(),
+        "Dataset Information": datasetInformation.toJson(),
+        "Dataset Summary": datasetSummary.toJson(),
+        "Disclaimers": disclaimers.toJson(),
+    };
+}
+
+class CommonCore {
+    final String contactEmail;
+    final String contactName;
+    final String publisher;
+
+    CommonCore({
+        required this.contactEmail,
+        required this.contactName,
+        required this.publisher,
+    });
+
+    factory CommonCore.fromJson(Map<String, dynamic> json) => CommonCore(
+        contactEmail: json["Contact Email"],
+        contactName: json["Contact Name"],
+        publisher: json["Publisher"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Email": contactEmail,
+        "Contact Name": contactName,
+        "Publisher": publisher,
+    };
+}
+
+class DatasetInformation {
+    final String agency;
+
+    DatasetInformation({
+        required this.agency,
+    });
+
+    factory DatasetInformation.fromJson(Map<String, dynamic> json) => DatasetInformation(
+        agency: json["Agency"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Agency": agency,
+    };
+}
+
+class DatasetSummary {
+    final String contactInformation;
+    final String coverage;
+    final String granularity;
+    final String organization;
+    final String postingFrequency;
+    final String timePeriod;
+
+    DatasetSummary({
+        required this.contactInformation,
+        required this.coverage,
+        required this.granularity,
+        required this.organization,
+        required this.postingFrequency,
+        required this.timePeriod,
+    });
+
+    factory DatasetSummary.fromJson(Map<String, dynamic> json) => DatasetSummary(
+        contactInformation: json["Contact Information"],
+        coverage: json["Coverage"],
+        granularity: json["Granularity"],
+        organization: json["Organization"],
+        postingFrequency: json["Posting Frequency"],
+        timePeriod: json["Time Period"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Contact Information": contactInformation,
+        "Coverage": coverage,
+        "Granularity": granularity,
+        "Organization": organization,
+        "Posting Frequency": postingFrequency,
+        "Time Period": timePeriod,
+    };
+}
+
+class Disclaimers {
+    final String disclaimer;
+    final String limitations;
+
+    Disclaimers({
+        required this.disclaimer,
+        required this.limitations,
+    });
+
+    factory Disclaimers.fromJson(Map<String, dynamic> json) => Disclaimers(
+        disclaimer: json["Disclaimer"],
+        limitations: json["Limitations"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Disclaimer": disclaimer,
+        "Limitations": limitations,
+    };
+}
+
+class FilterCondition {
+    final List<Child> children;
+    final FilterConditionMetadata metadata;
+    final String type;
+    final String value;
+
+    FilterCondition({
+        required this.children,
+        required this.metadata,
+        required this.type,
+        required this.value,
+    });
+
+    factory FilterCondition.fromJson(Map<String, dynamic> json) => FilterCondition(
+        children: List<Child>.from(json["children"].map((x) => Child.fromJson(x))),
+        metadata: FilterConditionMetadata.fromJson(json["metadata"]),
+        type: json["type"],
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "children": List<dynamic>.from(children.map((x) => x.toJson())),
+        "metadata": metadata.toJson(),
+        "type": type,
+        "value": value,
+    };
+}
+
+class Child {
+    final ChildMetadata metadata;
+    final String type;
+    final String value;
+
+    Child({
+        required this.metadata,
+        required this.type,
+        required this.value,
+    });
+
+    factory Child.fromJson(Map<String, dynamic> json) => Child(
+        metadata: ChildMetadata.fromJson(json["metadata"]),
+        type: json["type"],
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "metadata": metadata.toJson(),
+        "type": type,
+        "value": value,
+    };
+}
+
+class ChildMetadata {
+    final List<List<String>> customValues;
+    final String metadataOperator;
+    final TableColumnId tableColumnId;
+
+    ChildMetadata({
+        required this.customValues,
+        required this.metadataOperator,
+        required this.tableColumnId,
+    });
+
+    factory ChildMetadata.fromJson(Map<String, dynamic> json) => ChildMetadata(
+        customValues: List<List<String>>.from(json["customValues"].map((x) => List<String>.from(x.map((x) => x)))),
+        metadataOperator: json["operator"],
+        tableColumnId: TableColumnId.fromJson(json["tableColumnId"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "customValues": List<dynamic>.from(customValues.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "operator": metadataOperator,
+        "tableColumnId": tableColumnId.toJson(),
+    };
+}
+
+class TableColumnId {
+    final int the703610;
+
+    TableColumnId({
+        required this.the703610,
+    });
+
+    factory TableColumnId.fromJson(Map<String, dynamic> json) => TableColumnId(
+        the703610: json["703610"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "703610": the703610,
+    };
+}
+
+class FilterConditionMetadata {
+    final bool advanced;
+    final int unifiedVersion;
+
+    FilterConditionMetadata({
+        required this.advanced,
+        required this.unifiedVersion,
+    });
+
+    factory FilterConditionMetadata.fromJson(Map<String, dynamic> json) => FilterConditionMetadata(
+        advanced: json["advanced"],
+        unifiedVersion: json["unifiedVersion"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "advanced": advanced,
+        "unifiedVersion": unifiedVersion,
+    };
+}
+
+class JsonQuery {
+    final List<Order> order;
+
+    JsonQuery({
+        required this.order,
+    });
+
+    factory JsonQuery.fromJson(Map<String, dynamic> json) => JsonQuery(
+        order: List<Order>.from(json["order"].map((x) => Order.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "order": List<dynamic>.from(order.map((x) => x.toJson())),
+    };
+}
+
+class Order {
+    final bool ascending;
+    final String columnFieldName;
+
+    Order({
+        required this.ascending,
+        required this.columnFieldName,
+    });
+
+    factory Order.fromJson(Map<String, dynamic> json) => Order(
+        ascending: json["ascending"],
+        columnFieldName: json["columnFieldName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "columnFieldName": columnFieldName,
+    };
+}
+
+class RenderTypeConfig {
+    final Visible visible;
+
+    RenderTypeConfig({
+        required this.visible,
+    });
+
+    factory RenderTypeConfig.fromJson(Map<String, dynamic> json) => RenderTypeConfig(
+        visible: Visible.fromJson(json["visible"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "visible": visible.toJson(),
+    };
+}
+
+class Visible {
+    final bool table;
+
+    Visible({
+        required this.table,
+    });
+
+    factory Visible.fromJson(Map<String, dynamic> json) => Visible(
+        table: json["table"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "table": table,
+    };
+}
+
+class Owner {
+    final String displayName;
+    final String id;
+    final String profileImageUrlLarge;
+    final String profileImageUrlMedium;
+    final String profileImageUrlSmall;
+    final List<String> rights;
+    final String roleName;
+    final String screenName;
+
+    Owner({
+        required this.displayName,
+        required this.id,
+        required this.profileImageUrlLarge,
+        required this.profileImageUrlMedium,
+        required this.profileImageUrlSmall,
+        required this.rights,
+        required this.roleName,
+        required this.screenName,
+    });
+
+    factory Owner.fromJson(Map<String, dynamic> json) => Owner(
+        displayName: json["displayName"],
+        id: json["id"],
+        profileImageUrlLarge: json["profileImageUrlLarge"],
+        profileImageUrlMedium: json["profileImageUrlMedium"],
+        profileImageUrlSmall: json["profileImageUrlSmall"],
+        rights: List<String>.from(json["rights"].map((x) => x)),
+        roleName: json["roleName"],
+        screenName: json["screenName"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "displayName": displayName,
+        "id": id,
+        "profileImageUrlLarge": profileImageUrlLarge,
+        "profileImageUrlMedium": profileImageUrlMedium,
+        "profileImageUrlSmall": profileImageUrlSmall,
+        "rights": List<dynamic>.from(rights.map((x) => x)),
+        "roleName": roleName,
+        "screenName": screenName,
+    };
+}
+
+class Query {
+    final List<OrderBy> orderBys;
+
+    Query({
+        required this.orderBys,
+    });
+
+    factory Query.fromJson(Map<String, dynamic> json) => Query(
+        orderBys: List<OrderBy>.from(json["orderBys"].map((x) => OrderBy.fromJson(x))),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "orderBys": List<dynamic>.from(orderBys.map((x) => x.toJson())),
+    };
+}
+
+class OrderBy {
+    final bool ascending;
+    final Expression expression;
+
+    OrderBy({
+        required this.ascending,
+        required this.expression,
+    });
+
+    factory OrderBy.fromJson(Map<String, dynamic> json) => OrderBy(
+        ascending: json["ascending"],
+        expression: Expression.fromJson(json["expression"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ascending": ascending,
+        "expression": expression.toJson(),
+    };
+}
+
+class Expression {
+    final int columnId;
+    final String type;
+
+    Expression({
+        required this.columnId,
+        required this.type,
+    });
+
+    factory Expression.fromJson(Map<String, dynamic> json) => Expression(
+        columnId: json["columnId"],
+        type: json["type"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "columnId": columnId,
+        "type": type,
+    };
+}
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/head/dart/test/inputs/json/misc/fd329.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/fd329.json/default/TopLevel.dart
new file mode 100644
index 0000000..03bbd3d
--- /dev/null
+++ b/head/dart/test/inputs/json/misc/fd329.json/default/TopLevel.dart
@@ -0,0 +1,77 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final Map<String, Datum> data;
+    final Description description;
+
+    TopLevel({
+        required this.data,
+        required this.description,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        data: Map.from(json["data"]).map((k, v) => MapEntry<String, Datum>(k, Datum.fromJson(v))),
+        description: Description.fromJson(json["description"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "data": Map.from(data).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "description": description.toJson(),
+    };
+}
+
+class Datum {
+    final String anomaly;
+    final String value;
+
+    Datum({
+        required this.anomaly,
+        required this.value,
+    });
+
+    factory Datum.fromJson(Map<String, dynamic> json) => Datum(
+        anomaly: json["anomaly"],
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "anomaly": anomaly,
+        "value": value,
+    };
+}
+
+class Description {
+    final String basePeriod;
+    final int missing;
+    final String title;
+    final String units;
+
+    Description({
+        required this.basePeriod,
+        required this.missing,
+        required this.title,
+        required this.units,
+    });
+
+    factory Description.fromJson(Map<String, dynamic> json) => Description(
+        basePeriod: json["base_period"],
+        missing: json["missing"],
+        title: json["title"],
+        units: json["units"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "base_period": basePeriod,
+        "missing": missing,
+        "title": title,
+        "units": units,
+    };
+}
diff --git a/head/dart/test/inputs/json/priority/combinations1.json/default/TopLevel.dart b/head/dart/test/inputs/json/priority/combinations1.json/default/TopLevel.dart
new file mode 100644
index 0000000..ae9ec9d
--- /dev/null
+++ b/head/dart/test/inputs/json/priority/combinations1.json/default/TopLevel.dart
@@ -0,0 +1,1329 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String centrodesmose;
+    final List<dynamic> cerograph;
+    final List<dynamic> chemotherapeutics;
+    final List<dynamic> cimelia;
+    final int citrated;
+    final List<dynamic> clinodome;
+    final List<dynamic> coadjust;
+    final List<dynamic> consilience;
+    final List<dynamic> constructor;
+    final List<dynamic> continuative;
+    final List<dynamic> credulity;
+    final List<dynamic> creviced;
+    final List<List<int?>> cubiculum;
+    final List<dynamic> deruralize;
+    final List<dynamic> diaereses;
+    final List<List<dynamic>?> dissolution;
+    final List<dynamic> downstroke;
+    final List<double?> electrotautomerism;
+    final List<dynamic> eleutheromania;
+    final Encrust encrust;
+    final List<dynamic> entomoid;
+    final List<dynamic> epipaleolithic;
+    final List<dynamic> expropriable;
+    final List<dynamic> faggingly;
+    final List<dynamic> fenks;
+    final List<dynamic> flagmaking;
+    final List<dynamic> fluorometer;
+    final List<int?> fulsome;
+    final List<dynamic> fuzzy;
+    final List<dynamic> gardenwards;
+    final List<dynamic> generalissimo;
+    final List<Map<String, int>?> habeas;
+    final List<dynamic> hemicrystalline;
+    final List<dynamic> hemocoele;
+    final List<dynamic> hoister;
+    final List<dynamic> hyperpiesis;
+    final List<dynamic> hyppish;
+    final List<dynamic> idealizer;
+    final List<dynamic> incrustator;
+    final List<dynamic> intentiveness;
+    final Interacinar interacinar;
+    final List<List<int>?> intercorrelation;
+    final List<dynamic> jacutinga;
+
+    TopLevel({
+        required this.centrodesmose,
+        required this.cerograph,
+        required this.chemotherapeutics,
+        required this.cimelia,
+        required this.citrated,
+        required this.clinodome,
+        required this.coadjust,
+        required this.consilience,
+        required this.constructor,
+        required this.continuative,
+        required this.credulity,
+        required this.creviced,
+        required this.cubiculum,
+        required this.deruralize,
+        required this.diaereses,
+        required this.dissolution,
+        required this.downstroke,
+        required this.electrotautomerism,
+        required this.eleutheromania,
+        required this.encrust,
+        required this.entomoid,
+        required this.epipaleolithic,
+        required this.expropriable,
+        required this.faggingly,
+        required this.fenks,
+        required this.flagmaking,
+        required this.fluorometer,
+        required this.fulsome,
+        required this.fuzzy,
+        required this.gardenwards,
+        required this.generalissimo,
+        required this.habeas,
+        required this.hemicrystalline,
+        required this.hemocoele,
+        required this.hoister,
+        required this.hyperpiesis,
+        required this.hyppish,
+        required this.idealizer,
+        required this.incrustator,
+        required this.intentiveness,
+        required this.interacinar,
+        required this.intercorrelation,
+        required this.jacutinga,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        centrodesmose: json["centrodesmose"],
+        cerograph: List<dynamic>.from(json["cerograph"].map((x) => x)),
+        chemotherapeutics: List<dynamic>.from(json["chemotherapeutics"].map((x) => x)),
+        cimelia: List<dynamic>.from(json["cimelia"].map((x) => x)),
+        citrated: json["citrated"],
+        clinodome: List<dynamic>.from(json["clinodome"].map((x) => x)),
+        coadjust: List<dynamic>.from(json["coadjust"].map((x) => x)),
+        consilience: List<dynamic>.from(json["consilience"].map((x) => x)),
+        constructor: List<dynamic>.from(json["constructor"].map((x) => x)),
+        continuative: List<dynamic>.from(json["continuative"].map((x) => x)),
+        credulity: List<dynamic>.from(json["credulity"].map((x) => x)),
+        creviced: List<dynamic>.from(json["creviced"].map((x) => x)),
+        cubiculum: List<List<int?>>.from(json["cubiculum"].map((x) => List<int?>.from(x.map((x) => x)))),
+        deruralize: List<dynamic>.from(json["deruralize"].map((x) => x)),
+        diaereses: List<dynamic>.from(json["diaereses"].map((x) => x)),
+        dissolution: List<List<dynamic>?>.from(json["dissolution"].map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
+        downstroke: List<dynamic>.from(json["downstroke"].map((x) => x)),
+        electrotautomerism: List<double?>.from(json["electrotautomerism"].map((x) => x?.toDouble())),
+        eleutheromania: List<dynamic>.from(json["eleutheromania"].map((x) => x)),
+        encrust: Encrust.fromJson(json["encrust"]),
+        entomoid: List<dynamic>.from(json["entomoid"].map((x) => x)),
+        epipaleolithic: List<dynamic>.from(json["epipaleolithic"].map((x) => x)),
+        expropriable: List<dynamic>.from(json["expropriable"].map((x) => x)),
+        faggingly: List<dynamic>.from(json["faggingly"].map((x) => x)),
+        fenks: List<dynamic>.from(json["fenks"].map((x) => x)),
+        flagmaking: List<dynamic>.from(json["flagmaking"].map((x) => x)),
+        fluorometer: List<dynamic>.from(json["fluorometer"].map((x) => x)),
+        fulsome: List<int?>.from(json["fulsome"].map((x) => x)),
+        fuzzy: List<dynamic>.from(json["fuzzy"].map((x) => x)),
+        gardenwards: List<dynamic>.from(json["gardenwards"].map((x) => x)),
+        generalissimo: List<dynamic>.from(json["generalissimo"].map((x) => x)),
+        habeas: List<Map<String, int>?>.from(json["habeas"].map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, int>(k, v)))),
+        hemicrystalline: List<dynamic>.from(json["hemicrystalline"].map((x) => x)),
+        hemocoele: List<dynamic>.from(json["hemocoele"].map((x) => x)),
+        hoister: List<dynamic>.from(json["hoister"].map((x) => x)),
+        hyperpiesis: List<dynamic>.from(json["hyperpiesis"].map((x) => x)),
+        hyppish: List<dynamic>.from(json["hyppish"].map((x) => x)),
+        idealizer: List<dynamic>.from(json["idealizer"].map((x) => x)),
+        incrustator: List<dynamic>.from(json["incrustator"].map((x) => x)),
+        intentiveness: List<dynamic>.from(json["intentiveness"].map((x) => x)),
+        interacinar: Interacinar.fromJson(json["interacinar"]),
+        intercorrelation: List<List<int>?>.from(json["intercorrelation"].map((x) => x == null ? null : List<int>.from(x!.map((x) => x)))),
+        jacutinga: List<dynamic>.from(json["jacutinga"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "centrodesmose": centrodesmose,
+        "cerograph": List<dynamic>.from(cerograph.map((x) => x)),
+        "chemotherapeutics": List<dynamic>.from(chemotherapeutics.map((x) => x)),
+        "cimelia": List<dynamic>.from(cimelia.map((x) => x)),
+        "citrated": citrated,
+        "clinodome": List<dynamic>.from(clinodome.map((x) => x)),
+        "coadjust": List<dynamic>.from(coadjust.map((x) => x)),
+        "consilience": List<dynamic>.from(consilience.map((x) => x)),
+        "constructor": List<dynamic>.from(constructor.map((x) => x)),
+        "continuative": List<dynamic>.from(continuative.map((x) => x)),
+        "credulity": List<dynamic>.from(credulity.map((x) => x)),
+        "creviced": List<dynamic>.from(creviced.map((x) => x)),
+        "cubiculum": List<dynamic>.from(cubiculum.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "deruralize": List<dynamic>.from(deruralize.map((x) => x)),
+        "diaereses": List<dynamic>.from(diaereses.map((x) => x)),
+        "dissolution": List<dynamic>.from(dissolution.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
+        "downstroke": List<dynamic>.from(downstroke.map((x) => x)),
+        "electrotautomerism": List<dynamic>.from(electrotautomerism.map((x) => x)),
+        "eleutheromania": List<dynamic>.from(eleutheromania.map((x) => x)),
+        "encrust": encrust.toJson(),
+        "entomoid": List<dynamic>.from(entomoid.map((x) => x)),
+        "epipaleolithic": List<dynamic>.from(epipaleolithic.map((x) => x)),
+        "expropriable": List<dynamic>.from(expropriable.map((x) => x)),
+        "faggingly": List<dynamic>.from(faggingly.map((x) => x)),
+        "fenks": List<dynamic>.from(fenks.map((x) => x)),
+        "flagmaking": List<dynamic>.from(flagmaking.map((x) => x)),
+        "fluorometer": List<dynamic>.from(fluorometer.map((x) => x)),
+        "fulsome": List<dynamic>.from(fulsome.map((x) => x)),
+        "fuzzy": List<dynamic>.from(fuzzy.map((x) => x)),
+        "gardenwards": List<dynamic>.from(gardenwards.map((x) => x)),
+        "generalissimo": List<dynamic>.from(generalissimo.map((x) => x)),
+        "habeas": List<dynamic>.from(habeas.map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, dynamic>(k, v)))),
+        "hemicrystalline": List<dynamic>.from(hemicrystalline.map((x) => x)),
+        "hemocoele": List<dynamic>.from(hemocoele.map((x) => x)),
+        "hoister": List<dynamic>.from(hoister.map((x) => x)),
+        "hyperpiesis": List<dynamic>.from(hyperpiesis.map((x) => x)),
+        "hyppish": List<dynamic>.from(hyppish.map((x) => x)),
+        "idealizer": List<dynamic>.from(idealizer.map((x) => x)),
+        "incrustator": List<dynamic>.from(incrustator.map((x) => x)),
+        "intentiveness": List<dynamic>.from(intentiveness.map((x) => x)),
+        "interacinar": interacinar.toJson(),
+        "intercorrelation": List<dynamic>.from(intercorrelation.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
+        "jacutinga": List<dynamic>.from(jacutinga.map((x) => x)),
+    };
+}
+
+class CerographClass {
+    final dynamic apotropaion;
+    final dynamic casuary;
+    final dynamic creaker;
+    final dynamic disqualification;
+    final dynamic imperatorious;
+    final dynamic impermeabilize;
+    final dynamic metastoma;
+    final dynamic noctidiurnal;
+    final dynamic nonreserve;
+    final dynamic ophthalmotonometry;
+    final dynamic pailful;
+    final dynamic pigfish;
+    final dynamic pongee;
+    final dynamic prosodical;
+    final dynamic scrofuloderm;
+    final dynamic storekeeping;
+    final dynamic therologist;
+    final dynamic tolowa;
+    final dynamic tradeful;
+    final dynamic unriveting;
+
+    CerographClass({
+        required this.apotropaion,
+        required this.casuary,
+        required this.creaker,
+        required this.disqualification,
+        required this.imperatorious,
+        required this.impermeabilize,
+        required this.metastoma,
+        required this.noctidiurnal,
+        required this.nonreserve,
+        required this.ophthalmotonometry,
+        required this.pailful,
+        required this.pigfish,
+        required this.pongee,
+        required this.prosodical,
+        required this.scrofuloderm,
+        required this.storekeeping,
+        required this.therologist,
+        required this.tolowa,
+        required this.tradeful,
+        required this.unriveting,
+    });
+
+    factory CerographClass.fromJson(Map<String, dynamic> json) => CerographClass(
+        apotropaion: json["apotropaion"],
+        casuary: json["casuary"],
+        creaker: json["creaker"],
+        disqualification: json["disqualification"],
+        imperatorious: json["imperatorious"],
+        impermeabilize: json["impermeabilize"],
+        metastoma: json["metastoma"],
+        noctidiurnal: json["noctidiurnal"],
+        nonreserve: json["nonreserve"],
+        ophthalmotonometry: json["ophthalmotonometry"],
+        pailful: json["pailful"],
+        pigfish: json["pigfish"],
+        pongee: json["pongee"],
+        prosodical: json["prosodical"],
+        scrofuloderm: json["scrofuloderm"],
+        storekeeping: json["storekeeping"],
+        therologist: json["therologist"],
+        tolowa: json["Tolowa"],
+        tradeful: json["tradeful"],
+        unriveting: json["unriveting"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "apotropaion": apotropaion,
+        "casuary": casuary,
+        "creaker": creaker,
+        "disqualification": disqualification,
+        "imperatorious": imperatorious,
+        "impermeabilize": impermeabilize,
+        "metastoma": metastoma,
+        "noctidiurnal": noctidiurnal,
+        "nonreserve": nonreserve,
+        "ophthalmotonometry": ophthalmotonometry,
+        "pailful": pailful,
+        "pigfish": pigfish,
+        "pongee": pongee,
+        "prosodical": prosodical,
+        "scrofuloderm": scrofuloderm,
+        "storekeeping": storekeeping,
+        "therologist": therologist,
+        "Tolowa": tolowa,
+        "tradeful": tradeful,
+        "unriveting": unriveting,
+    };
+}
+
+class ChemotherapeuticClass {
+    final dynamic angioneurotic;
+    final dynamic availment;
+    final dynamic bladelet;
+    final double? catharticalness;
+    final dynamic caulis;
+    final dynamic chalcus;
+    final int? chirotherium;
+    final String? disdiapason;
+    final dynamic enteradenological;
+    final bool? homocerc;
+    final dynamic imporosity;
+    final dynamic insistently;
+    final dynamic intraparietal;
+    final dynamic ivied;
+    final dynamic maureen;
+    final dynamic nonbookish;
+    final dynamic nostochine;
+    final dynamic nutcracker;
+    final dynamic ofttimes;
+    final dynamic phenocryst;
+    final dynamic precoincident;
+    final dynamic ramiferous;
+    final dynamic stagmometer;
+    final dynamic tetherball;
+    final dynamic unshy;
+
+    ChemotherapeuticClass({
+        this.angioneurotic,
+        this.availment,
+        this.bladelet,
+        this.catharticalness,
+        this.caulis,
+        this.chalcus,
+        this.chirotherium,
+        this.disdiapason,
+        this.enteradenological,
+        this.homocerc,
+        this.imporosity,
+        this.insistently,
+        this.intraparietal,
+        this.ivied,
+        this.maureen,
+        this.nonbookish,
+        this.nostochine,
+        this.nutcracker,
+        this.ofttimes,
+        this.phenocryst,
+        this.precoincident,
+        this.ramiferous,
+        this.stagmometer,
+        this.tetherball,
+        this.unshy,
+    });
+
+    factory ChemotherapeuticClass.fromJson(Map<String, dynamic> json) => ChemotherapeuticClass(
+        angioneurotic: json["angioneurotic"],
+        availment: json["availment"],
+        bladelet: json["bladelet"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        caulis: json["caulis"],
+        chalcus: json["chalcus"],
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        enteradenological: json["enteradenological"],
+        homocerc: json["homocerc"],
+        imporosity: json["imporosity"],
+        insistently: json["insistently"],
+        intraparietal: json["intraparietal"],
+        ivied: json["ivied"],
+        maureen: json["Maureen"],
+        nonbookish: json["nonbookish"],
+        nostochine: json["nostochine"],
+        nutcracker: json["nutcracker"],
+        ofttimes: json["ofttimes"],
+        phenocryst: json["phenocryst"],
+        precoincident: json["precoincident"],
+        ramiferous: json["ramiferous"],
+        stagmometer: json["stagmometer"],
+        tetherball: json["tetherball"],
+        unshy: json["unshy"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "angioneurotic": angioneurotic,
+        "availment": availment,
+        "bladelet": bladelet,
+        "catharticalness": catharticalness,
+        "caulis": caulis,
+        "chalcus": chalcus,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "enteradenological": enteradenological,
+        "homocerc": homocerc,
+        "imporosity": imporosity,
+        "insistently": insistently,
+        "intraparietal": intraparietal,
+        "ivied": ivied,
+        "Maureen": maureen,
+        "nonbookish": nonbookish,
+        "nostochine": nostochine,
+        "nutcracker": nutcracker,
+        "ofttimes": ofttimes,
+        "phenocryst": phenocryst,
+        "precoincident": precoincident,
+        "ramiferous": ramiferous,
+        "stagmometer": stagmometer,
+        "tetherball": tetherball,
+        "unshy": unshy,
+    };
+}
+
+class CimeliaClass {
+    final double catharticalness;
+    final int chirotherium;
+    final String disdiapason;
+    final bool homocerc;
+    final dynamic nonbookish;
+
+    CimeliaClass({
+        required this.catharticalness,
+        required this.chirotherium,
+        required this.disdiapason,
+        required this.homocerc,
+        required this.nonbookish,
+    });
+
+    factory CimeliaClass.fromJson(Map<String, dynamic> json) => CimeliaClass(
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        homocerc: json["homocerc"],
+        nonbookish: json["nonbookish"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "homocerc": homocerc,
+        "nonbookish": nonbookish,
+    };
+}
+
+class CoadjustClass {
+    final dynamic amidosulphonal;
+    final dynamic benny;
+    final double? catharticalness;
+    final int? chirotherium;
+    final String? disdiapason;
+    final dynamic ensnare;
+    final bool? homocerc;
+    final dynamic hybridizer;
+    final dynamic leastwise;
+    final dynamic lof;
+    final dynamic monkhood;
+    final dynamic netherlandish;
+    final dynamic nonbookish;
+    final dynamic peonism;
+    final dynamic phonelescope;
+    final dynamic porphyrogeniture;
+    final dynamic preindemnify;
+    final dynamic rosal;
+    final dynamic scalenous;
+    final dynamic scopine;
+    final dynamic sedaceae;
+    final dynamic suberinize;
+    final dynamic symbiot;
+    final dynamic tablefellow;
+    final dynamic unchargeable;
+
+    CoadjustClass({
+        this.amidosulphonal,
+        this.benny,
+        this.catharticalness,
+        this.chirotherium,
+        this.disdiapason,
+        this.ensnare,
+        this.homocerc,
+        this.hybridizer,
+        this.leastwise,
+        this.lof,
+        this.monkhood,
+        this.netherlandish,
+        this.nonbookish,
+        this.peonism,
+        this.phonelescope,
+        this.porphyrogeniture,
+        this.preindemnify,
+        this.rosal,
+        this.scalenous,
+        this.scopine,
+        this.sedaceae,
+        this.suberinize,
+        this.symbiot,
+        this.tablefellow,
+        this.unchargeable,
+    });
+
+    factory CoadjustClass.fromJson(Map<String, dynamic> json) => CoadjustClass(
+        amidosulphonal: json["amidosulphonal"],
+        benny: json["Benny"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        ensnare: json["ensnare"],
+        homocerc: json["homocerc"],
+        hybridizer: json["hybridizer"],
+        leastwise: json["leastwise"],
+        lof: json["lof"],
+        monkhood: json["monkhood"],
+        netherlandish: json["Netherlandish"],
+        nonbookish: json["nonbookish"],
+        peonism: json["peonism"],
+        phonelescope: json["Phonelescope"],
+        porphyrogeniture: json["porphyrogeniture"],
+        preindemnify: json["preindemnify"],
+        rosal: json["rosal"],
+        scalenous: json["scalenous"],
+        scopine: json["scopine"],
+        sedaceae: json["Sedaceae"],
+        suberinize: json["suberinize"],
+        symbiot: json["symbiot"],
+        tablefellow: json["tablefellow"],
+        unchargeable: json["unchargeable"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "amidosulphonal": amidosulphonal,
+        "Benny": benny,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "ensnare": ensnare,
+        "homocerc": homocerc,
+        "hybridizer": hybridizer,
+        "leastwise": leastwise,
+        "lof": lof,
+        "monkhood": monkhood,
+        "Netherlandish": netherlandish,
+        "nonbookish": nonbookish,
+        "peonism": peonism,
+        "Phonelescope": phonelescope,
+        "porphyrogeniture": porphyrogeniture,
+        "preindemnify": preindemnify,
+        "rosal": rosal,
+        "scalenous": scalenous,
+        "scopine": scopine,
+        "Sedaceae": sedaceae,
+        "suberinize": suberinize,
+        "symbiot": symbiot,
+        "tablefellow": tablefellow,
+        "unchargeable": unchargeable,
+    };
+}
+
+class CredulityClass {
+    final dynamic ammonolytic;
+    final dynamic bushmaster;
+    final dynamic considering;
+    final dynamic consuetudinary;
+    final dynamic embarras;
+    final dynamic fineness;
+    final dynamic flaithship;
+    final dynamic flavia;
+    final dynamic gruffly;
+    final dynamic hedychium;
+    final dynamic leadwort;
+    final dynamic overseriously;
+    final dynamic parabola;
+    final dynamic pectinatodenticulate;
+    final dynamic popean;
+    final dynamic pornocrat;
+    final dynamic quadrisect;
+    final dynamic seriality;
+    final dynamic vamphorn;
+    final dynamic wharp;
+
+    CredulityClass({
+        required this.ammonolytic,
+        required this.bushmaster,
+        required this.considering,
+        required this.consuetudinary,
+        required this.embarras,
+        required this.fineness,
+        required this.flaithship,
+        required this.flavia,
+        required this.gruffly,
+        required this.hedychium,
+        required this.leadwort,
+        required this.overseriously,
+        required this.parabola,
+        required this.pectinatodenticulate,
+        required this.popean,
+        required this.pornocrat,
+        required this.quadrisect,
+        required this.seriality,
+        required this.vamphorn,
+        required this.wharp,
+    });
+
+    factory CredulityClass.fromJson(Map<String, dynamic> json) => CredulityClass(
+        ammonolytic: json["ammonolytic"],
+        bushmaster: json["bushmaster"],
+        considering: json["considering"],
+        consuetudinary: json["consuetudinary"],
+        embarras: json["embarras"],
+        fineness: json["fineness"],
+        flaithship: json["flaithship"],
+        flavia: json["Flavia"],
+        gruffly: json["gruffly"],
+        hedychium: json["Hedychium"],
+        leadwort: json["leadwort"],
+        overseriously: json["overseriously"],
+        parabola: json["parabola"],
+        pectinatodenticulate: json["pectinatodenticulate"],
+        popean: json["Popean"],
+        pornocrat: json["pornocrat"],
+        quadrisect: json["quadrisect"],
+        seriality: json["seriality"],
+        vamphorn: json["vamphorn"],
+        wharp: json["wharp"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ammonolytic": ammonolytic,
+        "bushmaster": bushmaster,
+        "considering": considering,
+        "consuetudinary": consuetudinary,
+        "embarras": embarras,
+        "fineness": fineness,
+        "flaithship": flaithship,
+        "Flavia": flavia,
+        "gruffly": gruffly,
+        "Hedychium": hedychium,
+        "leadwort": leadwort,
+        "overseriously": overseriously,
+        "parabola": parabola,
+        "pectinatodenticulate": pectinatodenticulate,
+        "Popean": popean,
+        "pornocrat": pornocrat,
+        "quadrisect": quadrisect,
+        "seriality": seriality,
+        "vamphorn": vamphorn,
+        "wharp": wharp,
+    };
+}
+
+class DeruralizeClass {
+    final dynamic bockerel;
+    final dynamic boulder;
+    final dynamic churrus;
+    final dynamic counterdigged;
+    final dynamic dialogite;
+    final dynamic digenic;
+    final dynamic dunbird;
+    final dynamic ergatogyne;
+    final dynamic fiendful;
+    final dynamic jackrod;
+    final dynamic jehovistic;
+    final dynamic paninean;
+    final dynamic panther;
+    final dynamic placentigerous;
+    final dynamic romney;
+    final dynamic sparm;
+    final dynamic tocsin;
+    final dynamic unnicked;
+    final dynamic unstavable;
+    final dynamic windfirm;
+
+    DeruralizeClass({
+        required this.bockerel,
+        required this.boulder,
+        required this.churrus,
+        required this.counterdigged,
+        required this.dialogite,
+        required this.digenic,
+        required this.dunbird,
+        required this.ergatogyne,
+        required this.fiendful,
+        required this.jackrod,
+        required this.jehovistic,
+        required this.paninean,
+        required this.panther,
+        required this.placentigerous,
+        required this.romney,
+        required this.sparm,
+        required this.tocsin,
+        required this.unnicked,
+        required this.unstavable,
+        required this.windfirm,
+    });
+
+    factory DeruralizeClass.fromJson(Map<String, dynamic> json) => DeruralizeClass(
+        bockerel: json["bockerel"],
+        boulder: json["boulder"],
+        churrus: json["churrus"],
+        counterdigged: json["counterdigged"],
+        dialogite: json["dialogite"],
+        digenic: json["digenic"],
+        dunbird: json["dunbird"],
+        ergatogyne: json["ergatogyne"],
+        fiendful: json["fiendful"],
+        jackrod: json["jackrod"],
+        jehovistic: json["Jehovistic"],
+        paninean: json["Paninean"],
+        panther: json["panther"],
+        placentigerous: json["placentigerous"],
+        romney: json["Romney"],
+        sparm: json["sparm"],
+        tocsin: json["tocsin"],
+        unnicked: json["unnicked"],
+        unstavable: json["unstavable"],
+        windfirm: json["windfirm"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bockerel": bockerel,
+        "boulder": boulder,
+        "churrus": churrus,
+        "counterdigged": counterdigged,
+        "dialogite": dialogite,
+        "digenic": digenic,
+        "dunbird": dunbird,
+        "ergatogyne": ergatogyne,
+        "fiendful": fiendful,
+        "jackrod": jackrod,
+        "Jehovistic": jehovistic,
+        "Paninean": paninean,
+        "panther": panther,
+        "placentigerous": placentigerous,
+        "Romney": romney,
+        "sparm": sparm,
+        "tocsin": tocsin,
+        "unnicked": unnicked,
+        "unstavable": unstavable,
+        "windfirm": windfirm,
+    };
+}
+
+class DiaereseClass {
+    final dynamic amoreuxia;
+    final dynamic ani;
+    final dynamic bernicle;
+    final dynamic blackwasher;
+    final dynamic blowhard;
+    final dynamic broma;
+    final dynamic closecross;
+    final dynamic congregationalism;
+    final dynamic grayly;
+    final dynamic historically;
+    final dynamic hoast;
+    final dynamic irretentive;
+    final dynamic parcener;
+    final dynamic pedder;
+    final dynamic pseudoanatomic;
+    final dynamic rhizocarpian;
+    final dynamic samel;
+    final dynamic silker;
+    final dynamic subdentated;
+    final dynamic subobscure;
+
+    DiaereseClass({
+        required this.amoreuxia,
+        required this.ani,
+        required this.bernicle,
+        required this.blackwasher,
+        required this.blowhard,
+        required this.broma,
+        required this.closecross,
+        required this.congregationalism,
+        required this.grayly,
+        required this.historically,
+        required this.hoast,
+        required this.irretentive,
+        required this.parcener,
+        required this.pedder,
+        required this.pseudoanatomic,
+        required this.rhizocarpian,
+        required this.samel,
+        required this.silker,
+        required this.subdentated,
+        required this.subobscure,
+    });
+
+    factory DiaereseClass.fromJson(Map<String, dynamic> json) => DiaereseClass(
+        amoreuxia: json["Amoreuxia"],
+        ani: json["ani"],
+        bernicle: json["bernicle"],
+        blackwasher: json["blackwasher"],
+        blowhard: json["blowhard"],
+        broma: json["broma"],
+        closecross: json["closecross"],
+        congregationalism: json["congregationalism"],
+        grayly: json["grayly"],
+        historically: json["historically"],
+        hoast: json["hoast"],
+        irretentive: json["irretentive"],
+        parcener: json["parcener"],
+        pedder: json["pedder"],
+        pseudoanatomic: json["pseudoanatomic"],
+        rhizocarpian: json["rhizocarpian"],
+        samel: json["samel"],
+        silker: json["silker"],
+        subdentated: json["subdentated"],
+        subobscure: json["subobscure"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Amoreuxia": amoreuxia,
+        "ani": ani,
+        "bernicle": bernicle,
+        "blackwasher": blackwasher,
+        "blowhard": blowhard,
+        "broma": broma,
+        "closecross": closecross,
+        "congregationalism": congregationalism,
+        "grayly": grayly,
+        "historically": historically,
+        "hoast": hoast,
+        "irretentive": irretentive,
+        "parcener": parcener,
+        "pedder": pedder,
+        "pseudoanatomic": pseudoanatomic,
+        "rhizocarpian": rhizocarpian,
+        "samel": samel,
+        "silker": silker,
+        "subdentated": subdentated,
+        "subobscure": subobscure,
+    };
+}
+
+class Encrust {
+    final dynamic comradely;
+    final dynamic diacanthous;
+    final dynamic feminineness;
+    final dynamic gossamered;
+    final dynamic hibernia;
+    final dynamic hibiscus;
+    final dynamic lepidosauria;
+    final dynamic lollingly;
+    final dynamic manager;
+    final dynamic mechanic;
+    final dynamic overminuteness;
+    final dynamic papelonne;
+    final dynamic plebification;
+    final dynamic pugmiller;
+    final dynamic recoveror;
+    final dynamic spermatoblastic;
+    final dynamic syllidae;
+    final dynamic ungyved;
+    final dynamic whirlabout;
+    final dynamic woodenware;
+
+    Encrust({
+        required this.comradely,
+        required this.diacanthous,
+        required this.feminineness,
+        required this.gossamered,
+        required this.hibernia,
+        required this.hibiscus,
+        required this.lepidosauria,
+        required this.lollingly,
+        required this.manager,
+        required this.mechanic,
+        required this.overminuteness,
+        required this.papelonne,
+        required this.plebification,
+        required this.pugmiller,
+        required this.recoveror,
+        required this.spermatoblastic,
+        required this.syllidae,
+        required this.ungyved,
+        required this.whirlabout,
+        required this.woodenware,
+    });
+
+    factory Encrust.fromJson(Map<String, dynamic> json) => Encrust(
+        comradely: json["comradely"],
+        diacanthous: json["diacanthous"],
+        feminineness: json["feminineness"],
+        gossamered: json["gossamered"],
+        hibernia: json["Hibernia"],
+        hibiscus: json["Hibiscus"],
+        lepidosauria: json["Lepidosauria"],
+        lollingly: json["lollingly"],
+        manager: json["manager"],
+        mechanic: json["mechanic"],
+        overminuteness: json["overminuteness"],
+        papelonne: json["papelonne"],
+        plebification: json["plebification"],
+        pugmiller: json["pugmiller"],
+        recoveror: json["recoveror"],
+        spermatoblastic: json["spermatoblastic"],
+        syllidae: json["Syllidae"],
+        ungyved: json["ungyved"],
+        whirlabout: json["whirlabout"],
+        woodenware: json["woodenware"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "comradely": comradely,
+        "diacanthous": diacanthous,
+        "feminineness": feminineness,
+        "gossamered": gossamered,
+        "Hibernia": hibernia,
+        "Hibiscus": hibiscus,
+        "Lepidosauria": lepidosauria,
+        "lollingly": lollingly,
+        "manager": manager,
+        "mechanic": mechanic,
+        "overminuteness": overminuteness,
+        "papelonne": papelonne,
+        "plebification": plebification,
+        "pugmiller": pugmiller,
+        "recoveror": recoveror,
+        "spermatoblastic": spermatoblastic,
+        "Syllidae": syllidae,
+        "ungyved": ungyved,
+        "whirlabout": whirlabout,
+        "woodenware": woodenware,
+    };
+}
+
+class FagginglyClass {
+    final dynamic abranchian;
+    final dynamic aculeiform;
+    final dynamic adiaphoristic;
+    final dynamic adoptionism;
+    final dynamic anglic;
+    final dynamic antrotomy;
+    final dynamic coerciveness;
+    final dynamic decorist;
+    final dynamic duckhood;
+    final dynamic heteromeri;
+    final dynamic hypochnose;
+    final dynamic lochage;
+    final dynamic melee;
+    final dynamic nonconformitant;
+    final dynamic poinsettia;
+    final dynamic putatively;
+    final dynamic semivolatile;
+    final dynamic soleas;
+    final dynamic unfastenable;
+    final dynamic unmillinered;
+
+    FagginglyClass({
+        required this.abranchian,
+        required this.aculeiform,
+        required this.adiaphoristic,
+        required this.adoptionism,
+        required this.anglic,
+        required this.antrotomy,
+        required this.coerciveness,
+        required this.decorist,
+        required this.duckhood,
+        required this.heteromeri,
+        required this.hypochnose,
+        required this.lochage,
+        required this.melee,
+        required this.nonconformitant,
+        required this.poinsettia,
+        required this.putatively,
+        required this.semivolatile,
+        required this.soleas,
+        required this.unfastenable,
+        required this.unmillinered,
+    });
+
+    factory FagginglyClass.fromJson(Map<String, dynamic> json) => FagginglyClass(
+        abranchian: json["abranchian"],
+        aculeiform: json["aculeiform"],
+        adiaphoristic: json["adiaphoristic"],
+        adoptionism: json["adoptionism"],
+        anglic: json["Anglic"],
+        antrotomy: json["antrotomy"],
+        coerciveness: json["coerciveness"],
+        decorist: json["decorist"],
+        duckhood: json["duckhood"],
+        heteromeri: json["Heteromeri"],
+        hypochnose: json["hypochnose"],
+        lochage: json["lochage"],
+        melee: json["melee"],
+        nonconformitant: json["nonconformitant"],
+        poinsettia: json["Poinsettia"],
+        putatively: json["putatively"],
+        semivolatile: json["semivolatile"],
+        soleas: json["soleas"],
+        unfastenable: json["unfastenable"],
+        unmillinered: json["unmillinered"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "abranchian": abranchian,
+        "aculeiform": aculeiform,
+        "adiaphoristic": adiaphoristic,
+        "adoptionism": adoptionism,
+        "Anglic": anglic,
+        "antrotomy": antrotomy,
+        "coerciveness": coerciveness,
+        "decorist": decorist,
+        "duckhood": duckhood,
+        "Heteromeri": heteromeri,
+        "hypochnose": hypochnose,
+        "lochage": lochage,
+        "melee": melee,
+        "nonconformitant": nonconformitant,
+        "Poinsettia": poinsettia,
+        "putatively": putatively,
+        "semivolatile": semivolatile,
+        "soleas": soleas,
+        "unfastenable": unfastenable,
+        "unmillinered": unmillinered,
+    };
+}
+
+class FenkClass {
+    final dynamic apoise;
+    final dynamic astronomize;
+    final dynamic cockhorse;
+    final dynamic copular;
+    final dynamic dagomba;
+    final dynamic draffy;
+    final dynamic foreigner;
+    final dynamic guyandot;
+    final dynamic neurogliosis;
+    final dynamic osmious;
+    final dynamic palpitate;
+    final dynamic rebukeable;
+    final dynamic reinwardtia;
+    final dynamic reservatory;
+    final dynamic scalt;
+    final dynamic scripturalize;
+    final dynamic tintometer;
+    final dynamic tritoness;
+    final dynamic undergrade;
+    final dynamic undermountain;
+
+    FenkClass({
+        required this.apoise,
+        required this.astronomize,
+        required this.cockhorse,
+        required this.copular,
+        required this.dagomba,
+        required this.draffy,
+        required this.foreigner,
+        required this.guyandot,
+        required this.neurogliosis,
+        required this.osmious,
+        required this.palpitate,
+        required this.rebukeable,
+        required this.reinwardtia,
+        required this.reservatory,
+        required this.scalt,
+        required this.scripturalize,
+        required this.tintometer,
+        required this.tritoness,
+        required this.undergrade,
+        required this.undermountain,
+    });
+
+    factory FenkClass.fromJson(Map<String, dynamic> json) => FenkClass(
+        apoise: json["apoise"],
+        astronomize: json["astronomize"],
+        cockhorse: json["cockhorse"],
+        copular: json["copular"],
+        dagomba: json["Dagomba"],
+        draffy: json["draffy"],
+        foreigner: json["foreigner"],
+        guyandot: json["Guyandot"],
+        neurogliosis: json["neurogliosis"],
+        osmious: json["osmious"],
+        palpitate: json["palpitate"],
+        rebukeable: json["rebukeable"],
+        reinwardtia: json["Reinwardtia"],
+        reservatory: json["reservatory"],
+        scalt: json["scalt"],
+        scripturalize: json["scripturalize"],
+        tintometer: json["tintometer"],
+        tritoness: json["Tritoness"],
+        undergrade: json["undergrade"],
+        undermountain: json["undermountain"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "apoise": apoise,
+        "astronomize": astronomize,
+        "cockhorse": cockhorse,
+        "copular": copular,
+        "Dagomba": dagomba,
+        "draffy": draffy,
+        "foreigner": foreigner,
+        "Guyandot": guyandot,
+        "neurogliosis": neurogliosis,
+        "osmious": osmious,
+        "palpitate": palpitate,
+        "rebukeable": rebukeable,
+        "Reinwardtia": reinwardtia,
+        "reservatory": reservatory,
+        "scalt": scalt,
+        "scripturalize": scripturalize,
+        "tintometer": tintometer,
+        "Tritoness": tritoness,
+        "undergrade": undergrade,
+        "undermountain": undermountain,
+    };
+}
+
+class FlagmakingClass {
+    final dynamic albarco;
+    final dynamic bunodonta;
+    final dynamic hornify;
+    final dynamic hydrocorisae;
+    final dynamic hypoglossus;
+    final dynamic inexpiably;
+    final dynamic ingratitude;
+    final dynamic ladyfly;
+    final dynamic medicament;
+    final dynamic monogrammatic;
+    final dynamic nobbut;
+    final dynamic notacanthidae;
+    final dynamic polyplacophore;
+    final dynamic proexercise;
+    final dynamic protoplast;
+    final dynamic puzzling;
+    final dynamic splanchnoskeleton;
+    final dynamic unloveliness;
+    final dynamic unquarantined;
+    final dynamic unrenounceable;
+
+    FlagmakingClass({
+        required this.albarco,
+        required this.bunodonta,
+        required this.hornify,
+        required this.hydrocorisae,
+        required this.hypoglossus,
+        required this.inexpiably,
+        required this.ingratitude,
+        required this.ladyfly,
+        required this.medicament,
+        required this.monogrammatic,
+        required this.nobbut,
+        required this.notacanthidae,
+        required this.polyplacophore,
+        required this.proexercise,
+        required this.protoplast,
+        required this.puzzling,
+        required this.splanchnoskeleton,
+        required this.unloveliness,
+        required this.unquarantined,
+        required this.unrenounceable,
+    });
+
+    factory FlagmakingClass.fromJson(Map<String, dynamic> json) => FlagmakingClass(
+        albarco: json["albarco"],
+        bunodonta: json["Bunodonta"],
+        hornify: json["hornify"],
+        hydrocorisae: json["Hydrocorisae"],
+        hypoglossus: json["hypoglossus"],
+        inexpiably: json["inexpiably"],
+        ingratitude: json["ingratitude"],
+        ladyfly: json["ladyfly"],
+        medicament: json["medicament"],
+        monogrammatic: json["monogrammatic"],
+        nobbut: json["nobbut"],
+        notacanthidae: json["Notacanthidae"],
+        polyplacophore: json["polyplacophore"],
+        proexercise: json["proexercise"],
+        protoplast: json["protoplast"],
+        puzzling: json["puzzling"],
+        splanchnoskeleton: json["splanchnoskeleton"],
+        unloveliness: json["unloveliness"],
+        unquarantined: json["unquarantined"],
+        unrenounceable: json["unrenounceable"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "albarco": albarco,
+        "Bunodonta": bunodonta,
+        "hornify": hornify,
+        "Hydrocorisae": hydrocorisae,
+        "hypoglossus": hypoglossus,
+        "inexpiably": inexpiably,
+        "ingratitude": ingratitude,
+        "ladyfly": ladyfly,
+        "medicament": medicament,
+        "monogrammatic": monogrammatic,
+        "nobbut": nobbut,
+        "Notacanthidae": notacanthidae,
+        "polyplacophore": polyplacophore,
+        "proexercise": proexercise,
+        "protoplast": protoplast,
+        "puzzling": puzzling,
+        "splanchnoskeleton": splanchnoskeleton,
+        "unloveliness": unloveliness,
+        "unquarantined": unquarantined,
+        "unrenounceable": unrenounceable,
+    };
+}
+
+class HemocoeleClass {
+    final dynamic acrogamy;
+    final dynamic amelification;
+    final dynamic autobiographic;
+    final dynamic berat;
+    final double? catharticalness;
+    final int? chirotherium;
+    final String? disdiapason;
+    final dynamic disproportionably;
+    final dynamic erythrite;
+    final dynamic graphic;
+    final dynamic hepatological;
+    final bool? homocerc;
+    final dynamic incommensurably;
+    final dynamic misaffirm;
+    final dynamic nonbookish;
+    final dynamic pocketbook;
+    final dynamic sclerometric;
+    final dynamic stambouline;
+    final dynamic stickpin;
+    final dynamic tubulure;
+    final dynamic undelated;
+    final dynamic unsalt;
+    final dynamic untutelar;
+    final dynamic vagrant;
+    final dynamic walt;
+
+    HemocoeleClass({
+        this.acrogamy,
+        this.amelification,
+        this.autobiographic,
+        this.berat,
+        this.catharticalness,
+        this.chirotherium,
+        this.disdiapason,
+        this.disproportionably,
+        this.erythrite,
+        this.graphic,
+        this.hepatological,
+        this.homocerc,
+        this.incommensurably,
+        this.misaffirm,
+        this.nonbookish,
+        this.pocketbook,
+        this.sclerometric,
+        this.stambouline,
+        this.stickpin,
+        this.tubulure,
+        this.undelated,
+        this.unsalt,
+        this.untutelar,
+        this.vagrant,
+        this.walt,
+    });
+
+    factory HemocoeleClass.fromJson(Map<String, dynamic> json) => HemocoeleClass(
+        acrogamy: json["acrogamy"],
+        amelification: json["amelification"],
+        autobiographic: json["autobiographic"],
+        berat: json["berat"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        disproportionably: json["disproportionably"],
+        erythrite: json["erythrite"],
+        graphic: json["graphic"],
+        hepatological: json["hepatological"],
+        homocerc: json["homocerc"],
+        incommensurably: json["incommensurably"],
+        misaffirm: json["misaffirm"],
+        nonbookish: json["nonbookish"],
+        pocketbook: json["pocketbook"],
+        sclerometric: json["sclerometric"],
+        stambouline: json["stambouline"],
+        stickpin: json["stickpin"],
+        tubulure: json["tubulure"],
+        undelated: json["undelated"],
+        unsalt: json["unsalt"],
+        untutelar: json["untutelar"],
+        vagrant: json["vagrant"],
+        walt: json["Walt"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "acrogamy": acrogamy,
+        "amelification": amelification,
+        "autobiographic": autobiographic,
+        "berat": berat,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "disproportionably": disproportionably,
+        "erythrite": erythrite,
+        "graphic": graphic,
+        "hepatological": hepatological,
+        "homocerc": homocerc,
+        "incommensurably": incommensurably,
+        "misaffirm": misaffirm,
+        "nonbookish": nonbookish,
+        "pocketbook": pocketbook,
+        "sclerometric": sclerometric,
+        "stambouline": stambouline,
+        "stickpin": stickpin,
+        "tubulure": tubulure,
+        "undelated": undelated,
+        "unsalt": unsalt,
+        "untutelar": untutelar,
+        "vagrant": vagrant,
+        "Walt": walt,
+    };
+}
+
+class Interacinar {
+    final double assapan;
+    final bool benefactorship;
+    final String triseriatim;
+    final int tubbing;
+    final dynamic untrimmed;
+
+    Interacinar({
+        required this.assapan,
+        required this.benefactorship,
+        required this.triseriatim,
+        required this.tubbing,
+        required this.untrimmed,
+    });
+
+    factory Interacinar.fromJson(Map<String, dynamic> json) => Interacinar(
+        assapan: json["assapan"]?.toDouble(),
+        benefactorship: json["benefactorship"],
+        triseriatim: json["triseriatim"],
+        tubbing: json["tubbing"],
+        untrimmed: json["untrimmed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "assapan": assapan,
+        "benefactorship": benefactorship,
+        "triseriatim": triseriatim,
+        "tubbing": tubbing,
+        "untrimmed": untrimmed,
+    };
+}
diff --git a/head/dart/test/inputs/json/priority/combinations1.json/final-props-false--58a791807e0c/TopLevel.dart b/head/dart/test/inputs/json/priority/combinations1.json/final-props-false--58a791807e0c/TopLevel.dart
new file mode 100644
index 0000000..5dce598
--- /dev/null
+++ b/head/dart/test/inputs/json/priority/combinations1.json/final-props-false--58a791807e0c/TopLevel.dart
@@ -0,0 +1,1329 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    String centrodesmose;
+    List<dynamic> cerograph;
+    List<dynamic> chemotherapeutics;
+    List<dynamic> cimelia;
+    int citrated;
+    List<dynamic> clinodome;
+    List<dynamic> coadjust;
+    List<dynamic> consilience;
+    List<dynamic> constructor;
+    List<dynamic> continuative;
+    List<dynamic> credulity;
+    List<dynamic> creviced;
+    List<List<int?>> cubiculum;
+    List<dynamic> deruralize;
+    List<dynamic> diaereses;
+    List<List<dynamic>?> dissolution;
+    List<dynamic> downstroke;
+    List<double?> electrotautomerism;
+    List<dynamic> eleutheromania;
+    Encrust encrust;
+    List<dynamic> entomoid;
+    List<dynamic> epipaleolithic;
+    List<dynamic> expropriable;
+    List<dynamic> faggingly;
+    List<dynamic> fenks;
+    List<dynamic> flagmaking;
+    List<dynamic> fluorometer;
+    List<int?> fulsome;
+    List<dynamic> fuzzy;
+    List<dynamic> gardenwards;
+    List<dynamic> generalissimo;
+    List<Map<String, int>?> habeas;
+    List<dynamic> hemicrystalline;
+    List<dynamic> hemocoele;
+    List<dynamic> hoister;
+    List<dynamic> hyperpiesis;
+    List<dynamic> hyppish;
+    List<dynamic> idealizer;
+    List<dynamic> incrustator;
+    List<dynamic> intentiveness;
+    Interacinar interacinar;
+    List<List<int>?> intercorrelation;
+    List<dynamic> jacutinga;
+
+    TopLevel({
+        required this.centrodesmose,
+        required this.cerograph,
+        required this.chemotherapeutics,
+        required this.cimelia,
+        required this.citrated,
+        required this.clinodome,
+        required this.coadjust,
+        required this.consilience,
+        required this.constructor,
+        required this.continuative,
+        required this.credulity,
+        required this.creviced,
+        required this.cubiculum,
+        required this.deruralize,
+        required this.diaereses,
+        required this.dissolution,
+        required this.downstroke,
+        required this.electrotautomerism,
+        required this.eleutheromania,
+        required this.encrust,
+        required this.entomoid,
+        required this.epipaleolithic,
+        required this.expropriable,
+        required this.faggingly,
+        required this.fenks,
+        required this.flagmaking,
+        required this.fluorometer,
+        required this.fulsome,
+        required this.fuzzy,
+        required this.gardenwards,
+        required this.generalissimo,
+        required this.habeas,
+        required this.hemicrystalline,
+        required this.hemocoele,
+        required this.hoister,
+        required this.hyperpiesis,
+        required this.hyppish,
+        required this.idealizer,
+        required this.incrustator,
+        required this.intentiveness,
+        required this.interacinar,
+        required this.intercorrelation,
+        required this.jacutinga,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        centrodesmose: json["centrodesmose"],
+        cerograph: List<dynamic>.from(json["cerograph"].map((x) => x)),
+        chemotherapeutics: List<dynamic>.from(json["chemotherapeutics"].map((x) => x)),
+        cimelia: List<dynamic>.from(json["cimelia"].map((x) => x)),
+        citrated: json["citrated"],
+        clinodome: List<dynamic>.from(json["clinodome"].map((x) => x)),
+        coadjust: List<dynamic>.from(json["coadjust"].map((x) => x)),
+        consilience: List<dynamic>.from(json["consilience"].map((x) => x)),
+        constructor: List<dynamic>.from(json["constructor"].map((x) => x)),
+        continuative: List<dynamic>.from(json["continuative"].map((x) => x)),
+        credulity: List<dynamic>.from(json["credulity"].map((x) => x)),
+        creviced: List<dynamic>.from(json["creviced"].map((x) => x)),
+        cubiculum: List<List<int?>>.from(json["cubiculum"].map((x) => List<int?>.from(x.map((x) => x)))),
+        deruralize: List<dynamic>.from(json["deruralize"].map((x) => x)),
+        diaereses: List<dynamic>.from(json["diaereses"].map((x) => x)),
+        dissolution: List<List<dynamic>?>.from(json["dissolution"].map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
+        downstroke: List<dynamic>.from(json["downstroke"].map((x) => x)),
+        electrotautomerism: List<double?>.from(json["electrotautomerism"].map((x) => x?.toDouble())),
+        eleutheromania: List<dynamic>.from(json["eleutheromania"].map((x) => x)),
+        encrust: Encrust.fromJson(json["encrust"]),
+        entomoid: List<dynamic>.from(json["entomoid"].map((x) => x)),
+        epipaleolithic: List<dynamic>.from(json["epipaleolithic"].map((x) => x)),
+        expropriable: List<dynamic>.from(json["expropriable"].map((x) => x)),
+        faggingly: List<dynamic>.from(json["faggingly"].map((x) => x)),
+        fenks: List<dynamic>.from(json["fenks"].map((x) => x)),
+        flagmaking: List<dynamic>.from(json["flagmaking"].map((x) => x)),
+        fluorometer: List<dynamic>.from(json["fluorometer"].map((x) => x)),
+        fulsome: List<int?>.from(json["fulsome"].map((x) => x)),
+        fuzzy: List<dynamic>.from(json["fuzzy"].map((x) => x)),
+        gardenwards: List<dynamic>.from(json["gardenwards"].map((x) => x)),
+        generalissimo: List<dynamic>.from(json["generalissimo"].map((x) => x)),
+        habeas: List<Map<String, int>?>.from(json["habeas"].map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, int>(k, v)))),
+        hemicrystalline: List<dynamic>.from(json["hemicrystalline"].map((x) => x)),
+        hemocoele: List<dynamic>.from(json["hemocoele"].map((x) => x)),
+        hoister: List<dynamic>.from(json["hoister"].map((x) => x)),
+        hyperpiesis: List<dynamic>.from(json["hyperpiesis"].map((x) => x)),
+        hyppish: List<dynamic>.from(json["hyppish"].map((x) => x)),
+        idealizer: List<dynamic>.from(json["idealizer"].map((x) => x)),
+        incrustator: List<dynamic>.from(json["incrustator"].map((x) => x)),
+        intentiveness: List<dynamic>.from(json["intentiveness"].map((x) => x)),
+        interacinar: Interacinar.fromJson(json["interacinar"]),
+        intercorrelation: List<List<int>?>.from(json["intercorrelation"].map((x) => x == null ? null : List<int>.from(x!.map((x) => x)))),
+        jacutinga: List<dynamic>.from(json["jacutinga"].map((x) => x)),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "centrodesmose": centrodesmose,
+        "cerograph": List<dynamic>.from(cerograph.map((x) => x)),
+        "chemotherapeutics": List<dynamic>.from(chemotherapeutics.map((x) => x)),
+        "cimelia": List<dynamic>.from(cimelia.map((x) => x)),
+        "citrated": citrated,
+        "clinodome": List<dynamic>.from(clinodome.map((x) => x)),
+        "coadjust": List<dynamic>.from(coadjust.map((x) => x)),
+        "consilience": List<dynamic>.from(consilience.map((x) => x)),
+        "constructor": List<dynamic>.from(constructor.map((x) => x)),
+        "continuative": List<dynamic>.from(continuative.map((x) => x)),
+        "credulity": List<dynamic>.from(credulity.map((x) => x)),
+        "creviced": List<dynamic>.from(creviced.map((x) => x)),
+        "cubiculum": List<dynamic>.from(cubiculum.map((x) => List<dynamic>.from(x.map((x) => x)))),
+        "deruralize": List<dynamic>.from(deruralize.map((x) => x)),
+        "diaereses": List<dynamic>.from(diaereses.map((x) => x)),
+        "dissolution": List<dynamic>.from(dissolution.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
+        "downstroke": List<dynamic>.from(downstroke.map((x) => x)),
+        "electrotautomerism": List<dynamic>.from(electrotautomerism.map((x) => x)),
+        "eleutheromania": List<dynamic>.from(eleutheromania.map((x) => x)),
+        "encrust": encrust.toJson(),
+        "entomoid": List<dynamic>.from(entomoid.map((x) => x)),
+        "epipaleolithic": List<dynamic>.from(epipaleolithic.map((x) => x)),
+        "expropriable": List<dynamic>.from(expropriable.map((x) => x)),
+        "faggingly": List<dynamic>.from(faggingly.map((x) => x)),
+        "fenks": List<dynamic>.from(fenks.map((x) => x)),
+        "flagmaking": List<dynamic>.from(flagmaking.map((x) => x)),
+        "fluorometer": List<dynamic>.from(fluorometer.map((x) => x)),
+        "fulsome": List<dynamic>.from(fulsome.map((x) => x)),
+        "fuzzy": List<dynamic>.from(fuzzy.map((x) => x)),
+        "gardenwards": List<dynamic>.from(gardenwards.map((x) => x)),
+        "generalissimo": List<dynamic>.from(generalissimo.map((x) => x)),
+        "habeas": List<dynamic>.from(habeas.map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, dynamic>(k, v)))),
+        "hemicrystalline": List<dynamic>.from(hemicrystalline.map((x) => x)),
+        "hemocoele": List<dynamic>.from(hemocoele.map((x) => x)),
+        "hoister": List<dynamic>.from(hoister.map((x) => x)),
+        "hyperpiesis": List<dynamic>.from(hyperpiesis.map((x) => x)),
+        "hyppish": List<dynamic>.from(hyppish.map((x) => x)),
+        "idealizer": List<dynamic>.from(idealizer.map((x) => x)),
+        "incrustator": List<dynamic>.from(incrustator.map((x) => x)),
+        "intentiveness": List<dynamic>.from(intentiveness.map((x) => x)),
+        "interacinar": interacinar.toJson(),
+        "intercorrelation": List<dynamic>.from(intercorrelation.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
+        "jacutinga": List<dynamic>.from(jacutinga.map((x) => x)),
+    };
+}
+
+class CerographClass {
+    dynamic apotropaion;
+    dynamic casuary;
+    dynamic creaker;
+    dynamic disqualification;
+    dynamic imperatorious;
+    dynamic impermeabilize;
+    dynamic metastoma;
+    dynamic noctidiurnal;
+    dynamic nonreserve;
+    dynamic ophthalmotonometry;
+    dynamic pailful;
+    dynamic pigfish;
+    dynamic pongee;
+    dynamic prosodical;
+    dynamic scrofuloderm;
+    dynamic storekeeping;
+    dynamic therologist;
+    dynamic tolowa;
+    dynamic tradeful;
+    dynamic unriveting;
+
+    CerographClass({
+        required this.apotropaion,
+        required this.casuary,
+        required this.creaker,
+        required this.disqualification,
+        required this.imperatorious,
+        required this.impermeabilize,
+        required this.metastoma,
+        required this.noctidiurnal,
+        required this.nonreserve,
+        required this.ophthalmotonometry,
+        required this.pailful,
+        required this.pigfish,
+        required this.pongee,
+        required this.prosodical,
+        required this.scrofuloderm,
+        required this.storekeeping,
+        required this.therologist,
+        required this.tolowa,
+        required this.tradeful,
+        required this.unriveting,
+    });
+
+    factory CerographClass.fromJson(Map<String, dynamic> json) => CerographClass(
+        apotropaion: json["apotropaion"],
+        casuary: json["casuary"],
+        creaker: json["creaker"],
+        disqualification: json["disqualification"],
+        imperatorious: json["imperatorious"],
+        impermeabilize: json["impermeabilize"],
+        metastoma: json["metastoma"],
+        noctidiurnal: json["noctidiurnal"],
+        nonreserve: json["nonreserve"],
+        ophthalmotonometry: json["ophthalmotonometry"],
+        pailful: json["pailful"],
+        pigfish: json["pigfish"],
+        pongee: json["pongee"],
+        prosodical: json["prosodical"],
+        scrofuloderm: json["scrofuloderm"],
+        storekeeping: json["storekeeping"],
+        therologist: json["therologist"],
+        tolowa: json["Tolowa"],
+        tradeful: json["tradeful"],
+        unriveting: json["unriveting"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "apotropaion": apotropaion,
+        "casuary": casuary,
+        "creaker": creaker,
+        "disqualification": disqualification,
+        "imperatorious": imperatorious,
+        "impermeabilize": impermeabilize,
+        "metastoma": metastoma,
+        "noctidiurnal": noctidiurnal,
+        "nonreserve": nonreserve,
+        "ophthalmotonometry": ophthalmotonometry,
+        "pailful": pailful,
+        "pigfish": pigfish,
+        "pongee": pongee,
+        "prosodical": prosodical,
+        "scrofuloderm": scrofuloderm,
+        "storekeeping": storekeeping,
+        "therologist": therologist,
+        "Tolowa": tolowa,
+        "tradeful": tradeful,
+        "unriveting": unriveting,
+    };
+}
+
+class ChemotherapeuticClass {
+    dynamic angioneurotic;
+    dynamic availment;
+    dynamic bladelet;
+    double? catharticalness;
+    dynamic caulis;
+    dynamic chalcus;
+    int? chirotherium;
+    String? disdiapason;
+    dynamic enteradenological;
+    bool? homocerc;
+    dynamic imporosity;
+    dynamic insistently;
+    dynamic intraparietal;
+    dynamic ivied;
+    dynamic maureen;
+    dynamic nonbookish;
+    dynamic nostochine;
+    dynamic nutcracker;
+    dynamic ofttimes;
+    dynamic phenocryst;
+    dynamic precoincident;
+    dynamic ramiferous;
+    dynamic stagmometer;
+    dynamic tetherball;
+    dynamic unshy;
+
+    ChemotherapeuticClass({
+        this.angioneurotic,
+        this.availment,
+        this.bladelet,
+        this.catharticalness,
+        this.caulis,
+        this.chalcus,
+        this.chirotherium,
+        this.disdiapason,
+        this.enteradenological,
+        this.homocerc,
+        this.imporosity,
+        this.insistently,
+        this.intraparietal,
+        this.ivied,
+        this.maureen,
+        this.nonbookish,
+        this.nostochine,
+        this.nutcracker,
+        this.ofttimes,
+        this.phenocryst,
+        this.precoincident,
+        this.ramiferous,
+        this.stagmometer,
+        this.tetherball,
+        this.unshy,
+    });
+
+    factory ChemotherapeuticClass.fromJson(Map<String, dynamic> json) => ChemotherapeuticClass(
+        angioneurotic: json["angioneurotic"],
+        availment: json["availment"],
+        bladelet: json["bladelet"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        caulis: json["caulis"],
+        chalcus: json["chalcus"],
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        enteradenological: json["enteradenological"],
+        homocerc: json["homocerc"],
+        imporosity: json["imporosity"],
+        insistently: json["insistently"],
+        intraparietal: json["intraparietal"],
+        ivied: json["ivied"],
+        maureen: json["Maureen"],
+        nonbookish: json["nonbookish"],
+        nostochine: json["nostochine"],
+        nutcracker: json["nutcracker"],
+        ofttimes: json["ofttimes"],
+        phenocryst: json["phenocryst"],
+        precoincident: json["precoincident"],
+        ramiferous: json["ramiferous"],
+        stagmometer: json["stagmometer"],
+        tetherball: json["tetherball"],
+        unshy: json["unshy"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "angioneurotic": angioneurotic,
+        "availment": availment,
+        "bladelet": bladelet,
+        "catharticalness": catharticalness,
+        "caulis": caulis,
+        "chalcus": chalcus,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "enteradenological": enteradenological,
+        "homocerc": homocerc,
+        "imporosity": imporosity,
+        "insistently": insistently,
+        "intraparietal": intraparietal,
+        "ivied": ivied,
+        "Maureen": maureen,
+        "nonbookish": nonbookish,
+        "nostochine": nostochine,
+        "nutcracker": nutcracker,
+        "ofttimes": ofttimes,
+        "phenocryst": phenocryst,
+        "precoincident": precoincident,
+        "ramiferous": ramiferous,
+        "stagmometer": stagmometer,
+        "tetherball": tetherball,
+        "unshy": unshy,
+    };
+}
+
+class CimeliaClass {
+    double catharticalness;
+    int chirotherium;
+    String disdiapason;
+    bool homocerc;
+    dynamic nonbookish;
+
+    CimeliaClass({
+        required this.catharticalness,
+        required this.chirotherium,
+        required this.disdiapason,
+        required this.homocerc,
+        required this.nonbookish,
+    });
+
+    factory CimeliaClass.fromJson(Map<String, dynamic> json) => CimeliaClass(
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        homocerc: json["homocerc"],
+        nonbookish: json["nonbookish"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "homocerc": homocerc,
+        "nonbookish": nonbookish,
+    };
+}
+
+class CoadjustClass {
+    dynamic amidosulphonal;
+    dynamic benny;
+    double? catharticalness;
+    int? chirotherium;
+    String? disdiapason;
+    dynamic ensnare;
+    bool? homocerc;
+    dynamic hybridizer;
+    dynamic leastwise;
+    dynamic lof;
+    dynamic monkhood;
+    dynamic netherlandish;
+    dynamic nonbookish;
+    dynamic peonism;
+    dynamic phonelescope;
+    dynamic porphyrogeniture;
+    dynamic preindemnify;
+    dynamic rosal;
+    dynamic scalenous;
+    dynamic scopine;
+    dynamic sedaceae;
+    dynamic suberinize;
+    dynamic symbiot;
+    dynamic tablefellow;
+    dynamic unchargeable;
+
+    CoadjustClass({
+        this.amidosulphonal,
+        this.benny,
+        this.catharticalness,
+        this.chirotherium,
+        this.disdiapason,
+        this.ensnare,
+        this.homocerc,
+        this.hybridizer,
+        this.leastwise,
+        this.lof,
+        this.monkhood,
+        this.netherlandish,
+        this.nonbookish,
+        this.peonism,
+        this.phonelescope,
+        this.porphyrogeniture,
+        this.preindemnify,
+        this.rosal,
+        this.scalenous,
+        this.scopine,
+        this.sedaceae,
+        this.suberinize,
+        this.symbiot,
+        this.tablefellow,
+        this.unchargeable,
+    });
+
+    factory CoadjustClass.fromJson(Map<String, dynamic> json) => CoadjustClass(
+        amidosulphonal: json["amidosulphonal"],
+        benny: json["Benny"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        ensnare: json["ensnare"],
+        homocerc: json["homocerc"],
+        hybridizer: json["hybridizer"],
+        leastwise: json["leastwise"],
+        lof: json["lof"],
+        monkhood: json["monkhood"],
+        netherlandish: json["Netherlandish"],
+        nonbookish: json["nonbookish"],
+        peonism: json["peonism"],
+        phonelescope: json["Phonelescope"],
+        porphyrogeniture: json["porphyrogeniture"],
+        preindemnify: json["preindemnify"],
+        rosal: json["rosal"],
+        scalenous: json["scalenous"],
+        scopine: json["scopine"],
+        sedaceae: json["Sedaceae"],
+        suberinize: json["suberinize"],
+        symbiot: json["symbiot"],
+        tablefellow: json["tablefellow"],
+        unchargeable: json["unchargeable"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "amidosulphonal": amidosulphonal,
+        "Benny": benny,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "ensnare": ensnare,
+        "homocerc": homocerc,
+        "hybridizer": hybridizer,
+        "leastwise": leastwise,
+        "lof": lof,
+        "monkhood": monkhood,
+        "Netherlandish": netherlandish,
+        "nonbookish": nonbookish,
+        "peonism": peonism,
+        "Phonelescope": phonelescope,
+        "porphyrogeniture": porphyrogeniture,
+        "preindemnify": preindemnify,
+        "rosal": rosal,
+        "scalenous": scalenous,
+        "scopine": scopine,
+        "Sedaceae": sedaceae,
+        "suberinize": suberinize,
+        "symbiot": symbiot,
+        "tablefellow": tablefellow,
+        "unchargeable": unchargeable,
+    };
+}
+
+class CredulityClass {
+    dynamic ammonolytic;
+    dynamic bushmaster;
+    dynamic considering;
+    dynamic consuetudinary;
+    dynamic embarras;
+    dynamic fineness;
+    dynamic flaithship;
+    dynamic flavia;
+    dynamic gruffly;
+    dynamic hedychium;
+    dynamic leadwort;
+    dynamic overseriously;
+    dynamic parabola;
+    dynamic pectinatodenticulate;
+    dynamic popean;
+    dynamic pornocrat;
+    dynamic quadrisect;
+    dynamic seriality;
+    dynamic vamphorn;
+    dynamic wharp;
+
+    CredulityClass({
+        required this.ammonolytic,
+        required this.bushmaster,
+        required this.considering,
+        required this.consuetudinary,
+        required this.embarras,
+        required this.fineness,
+        required this.flaithship,
+        required this.flavia,
+        required this.gruffly,
+        required this.hedychium,
+        required this.leadwort,
+        required this.overseriously,
+        required this.parabola,
+        required this.pectinatodenticulate,
+        required this.popean,
+        required this.pornocrat,
+        required this.quadrisect,
+        required this.seriality,
+        required this.vamphorn,
+        required this.wharp,
+    });
+
+    factory CredulityClass.fromJson(Map<String, dynamic> json) => CredulityClass(
+        ammonolytic: json["ammonolytic"],
+        bushmaster: json["bushmaster"],
+        considering: json["considering"],
+        consuetudinary: json["consuetudinary"],
+        embarras: json["embarras"],
+        fineness: json["fineness"],
+        flaithship: json["flaithship"],
+        flavia: json["Flavia"],
+        gruffly: json["gruffly"],
+        hedychium: json["Hedychium"],
+        leadwort: json["leadwort"],
+        overseriously: json["overseriously"],
+        parabola: json["parabola"],
+        pectinatodenticulate: json["pectinatodenticulate"],
+        popean: json["Popean"],
+        pornocrat: json["pornocrat"],
+        quadrisect: json["quadrisect"],
+        seriality: json["seriality"],
+        vamphorn: json["vamphorn"],
+        wharp: json["wharp"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "ammonolytic": ammonolytic,
+        "bushmaster": bushmaster,
+        "considering": considering,
+        "consuetudinary": consuetudinary,
+        "embarras": embarras,
+        "fineness": fineness,
+        "flaithship": flaithship,
+        "Flavia": flavia,
+        "gruffly": gruffly,
+        "Hedychium": hedychium,
+        "leadwort": leadwort,
+        "overseriously": overseriously,
+        "parabola": parabola,
+        "pectinatodenticulate": pectinatodenticulate,
+        "Popean": popean,
+        "pornocrat": pornocrat,
+        "quadrisect": quadrisect,
+        "seriality": seriality,
+        "vamphorn": vamphorn,
+        "wharp": wharp,
+    };
+}
+
+class DeruralizeClass {
+    dynamic bockerel;
+    dynamic boulder;
+    dynamic churrus;
+    dynamic counterdigged;
+    dynamic dialogite;
+    dynamic digenic;
+    dynamic dunbird;
+    dynamic ergatogyne;
+    dynamic fiendful;
+    dynamic jackrod;
+    dynamic jehovistic;
+    dynamic paninean;
+    dynamic panther;
+    dynamic placentigerous;
+    dynamic romney;
+    dynamic sparm;
+    dynamic tocsin;
+    dynamic unnicked;
+    dynamic unstavable;
+    dynamic windfirm;
+
+    DeruralizeClass({
+        required this.bockerel,
+        required this.boulder,
+        required this.churrus,
+        required this.counterdigged,
+        required this.dialogite,
+        required this.digenic,
+        required this.dunbird,
+        required this.ergatogyne,
+        required this.fiendful,
+        required this.jackrod,
+        required this.jehovistic,
+        required this.paninean,
+        required this.panther,
+        required this.placentigerous,
+        required this.romney,
+        required this.sparm,
+        required this.tocsin,
+        required this.unnicked,
+        required this.unstavable,
+        required this.windfirm,
+    });
+
+    factory DeruralizeClass.fromJson(Map<String, dynamic> json) => DeruralizeClass(
+        bockerel: json["bockerel"],
+        boulder: json["boulder"],
+        churrus: json["churrus"],
+        counterdigged: json["counterdigged"],
+        dialogite: json["dialogite"],
+        digenic: json["digenic"],
+        dunbird: json["dunbird"],
+        ergatogyne: json["ergatogyne"],
+        fiendful: json["fiendful"],
+        jackrod: json["jackrod"],
+        jehovistic: json["Jehovistic"],
+        paninean: json["Paninean"],
+        panther: json["panther"],
+        placentigerous: json["placentigerous"],
+        romney: json["Romney"],
+        sparm: json["sparm"],
+        tocsin: json["tocsin"],
+        unnicked: json["unnicked"],
+        unstavable: json["unstavable"],
+        windfirm: json["windfirm"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "bockerel": bockerel,
+        "boulder": boulder,
+        "churrus": churrus,
+        "counterdigged": counterdigged,
+        "dialogite": dialogite,
+        "digenic": digenic,
+        "dunbird": dunbird,
+        "ergatogyne": ergatogyne,
+        "fiendful": fiendful,
+        "jackrod": jackrod,
+        "Jehovistic": jehovistic,
+        "Paninean": paninean,
+        "panther": panther,
+        "placentigerous": placentigerous,
+        "Romney": romney,
+        "sparm": sparm,
+        "tocsin": tocsin,
+        "unnicked": unnicked,
+        "unstavable": unstavable,
+        "windfirm": windfirm,
+    };
+}
+
+class DiaereseClass {
+    dynamic amoreuxia;
+    dynamic ani;
+    dynamic bernicle;
+    dynamic blackwasher;
+    dynamic blowhard;
+    dynamic broma;
+    dynamic closecross;
+    dynamic congregationalism;
+    dynamic grayly;
+    dynamic historically;
+    dynamic hoast;
+    dynamic irretentive;
+    dynamic parcener;
+    dynamic pedder;
+    dynamic pseudoanatomic;
+    dynamic rhizocarpian;
+    dynamic samel;
+    dynamic silker;
+    dynamic subdentated;
+    dynamic subobscure;
+
+    DiaereseClass({
+        required this.amoreuxia,
+        required this.ani,
+        required this.bernicle,
+        required this.blackwasher,
+        required this.blowhard,
+        required this.broma,
+        required this.closecross,
+        required this.congregationalism,
+        required this.grayly,
+        required this.historically,
+        required this.hoast,
+        required this.irretentive,
+        required this.parcener,
+        required this.pedder,
+        required this.pseudoanatomic,
+        required this.rhizocarpian,
+        required this.samel,
+        required this.silker,
+        required this.subdentated,
+        required this.subobscure,
+    });
+
+    factory DiaereseClass.fromJson(Map<String, dynamic> json) => DiaereseClass(
+        amoreuxia: json["Amoreuxia"],
+        ani: json["ani"],
+        bernicle: json["bernicle"],
+        blackwasher: json["blackwasher"],
+        blowhard: json["blowhard"],
+        broma: json["broma"],
+        closecross: json["closecross"],
+        congregationalism: json["congregationalism"],
+        grayly: json["grayly"],
+        historically: json["historically"],
+        hoast: json["hoast"],
+        irretentive: json["irretentive"],
+        parcener: json["parcener"],
+        pedder: json["pedder"],
+        pseudoanatomic: json["pseudoanatomic"],
+        rhizocarpian: json["rhizocarpian"],
+        samel: json["samel"],
+        silker: json["silker"],
+        subdentated: json["subdentated"],
+        subobscure: json["subobscure"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Amoreuxia": amoreuxia,
+        "ani": ani,
+        "bernicle": bernicle,
+        "blackwasher": blackwasher,
+        "blowhard": blowhard,
+        "broma": broma,
+        "closecross": closecross,
+        "congregationalism": congregationalism,
+        "grayly": grayly,
+        "historically": historically,
+        "hoast": hoast,
+        "irretentive": irretentive,
+        "parcener": parcener,
+        "pedder": pedder,
+        "pseudoanatomic": pseudoanatomic,
+        "rhizocarpian": rhizocarpian,
+        "samel": samel,
+        "silker": silker,
+        "subdentated": subdentated,
+        "subobscure": subobscure,
+    };
+}
+
+class Encrust {
+    dynamic comradely;
+    dynamic diacanthous;
+    dynamic feminineness;
+    dynamic gossamered;
+    dynamic hibernia;
+    dynamic hibiscus;
+    dynamic lepidosauria;
+    dynamic lollingly;
+    dynamic manager;
+    dynamic mechanic;
+    dynamic overminuteness;
+    dynamic papelonne;
+    dynamic plebification;
+    dynamic pugmiller;
+    dynamic recoveror;
+    dynamic spermatoblastic;
+    dynamic syllidae;
+    dynamic ungyved;
+    dynamic whirlabout;
+    dynamic woodenware;
+
+    Encrust({
+        required this.comradely,
+        required this.diacanthous,
+        required this.feminineness,
+        required this.gossamered,
+        required this.hibernia,
+        required this.hibiscus,
+        required this.lepidosauria,
+        required this.lollingly,
+        required this.manager,
+        required this.mechanic,
+        required this.overminuteness,
+        required this.papelonne,
+        required this.plebification,
+        required this.pugmiller,
+        required this.recoveror,
+        required this.spermatoblastic,
+        required this.syllidae,
+        required this.ungyved,
+        required this.whirlabout,
+        required this.woodenware,
+    });
+
+    factory Encrust.fromJson(Map<String, dynamic> json) => Encrust(
+        comradely: json["comradely"],
+        diacanthous: json["diacanthous"],
+        feminineness: json["feminineness"],
+        gossamered: json["gossamered"],
+        hibernia: json["Hibernia"],
+        hibiscus: json["Hibiscus"],
+        lepidosauria: json["Lepidosauria"],
+        lollingly: json["lollingly"],
+        manager: json["manager"],
+        mechanic: json["mechanic"],
+        overminuteness: json["overminuteness"],
+        papelonne: json["papelonne"],
+        plebification: json["plebification"],
+        pugmiller: json["pugmiller"],
+        recoveror: json["recoveror"],
+        spermatoblastic: json["spermatoblastic"],
+        syllidae: json["Syllidae"],
+        ungyved: json["ungyved"],
+        whirlabout: json["whirlabout"],
+        woodenware: json["woodenware"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "comradely": comradely,
+        "diacanthous": diacanthous,
+        "feminineness": feminineness,
+        "gossamered": gossamered,
+        "Hibernia": hibernia,
+        "Hibiscus": hibiscus,
+        "Lepidosauria": lepidosauria,
+        "lollingly": lollingly,
+        "manager": manager,
+        "mechanic": mechanic,
+        "overminuteness": overminuteness,
+        "papelonne": papelonne,
+        "plebification": plebification,
+        "pugmiller": pugmiller,
+        "recoveror": recoveror,
+        "spermatoblastic": spermatoblastic,
+        "Syllidae": syllidae,
+        "ungyved": ungyved,
+        "whirlabout": whirlabout,
+        "woodenware": woodenware,
+    };
+}
+
+class FagginglyClass {
+    dynamic abranchian;
+    dynamic aculeiform;
+    dynamic adiaphoristic;
+    dynamic adoptionism;
+    dynamic anglic;
+    dynamic antrotomy;
+    dynamic coerciveness;
+    dynamic decorist;
+    dynamic duckhood;
+    dynamic heteromeri;
+    dynamic hypochnose;
+    dynamic lochage;
+    dynamic melee;
+    dynamic nonconformitant;
+    dynamic poinsettia;
+    dynamic putatively;
+    dynamic semivolatile;
+    dynamic soleas;
+    dynamic unfastenable;
+    dynamic unmillinered;
+
+    FagginglyClass({
+        required this.abranchian,
+        required this.aculeiform,
+        required this.adiaphoristic,
+        required this.adoptionism,
+        required this.anglic,
+        required this.antrotomy,
+        required this.coerciveness,
+        required this.decorist,
+        required this.duckhood,
+        required this.heteromeri,
+        required this.hypochnose,
+        required this.lochage,
+        required this.melee,
+        required this.nonconformitant,
+        required this.poinsettia,
+        required this.putatively,
+        required this.semivolatile,
+        required this.soleas,
+        required this.unfastenable,
+        required this.unmillinered,
+    });
+
+    factory FagginglyClass.fromJson(Map<String, dynamic> json) => FagginglyClass(
+        abranchian: json["abranchian"],
+        aculeiform: json["aculeiform"],
+        adiaphoristic: json["adiaphoristic"],
+        adoptionism: json["adoptionism"],
+        anglic: json["Anglic"],
+        antrotomy: json["antrotomy"],
+        coerciveness: json["coerciveness"],
+        decorist: json["decorist"],
+        duckhood: json["duckhood"],
+        heteromeri: json["Heteromeri"],
+        hypochnose: json["hypochnose"],
+        lochage: json["lochage"],
+        melee: json["melee"],
+        nonconformitant: json["nonconformitant"],
+        poinsettia: json["Poinsettia"],
+        putatively: json["putatively"],
+        semivolatile: json["semivolatile"],
+        soleas: json["soleas"],
+        unfastenable: json["unfastenable"],
+        unmillinered: json["unmillinered"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "abranchian": abranchian,
+        "aculeiform": aculeiform,
+        "adiaphoristic": adiaphoristic,
+        "adoptionism": adoptionism,
+        "Anglic": anglic,
+        "antrotomy": antrotomy,
+        "coerciveness": coerciveness,
+        "decorist": decorist,
+        "duckhood": duckhood,
+        "Heteromeri": heteromeri,
+        "hypochnose": hypochnose,
+        "lochage": lochage,
+        "melee": melee,
+        "nonconformitant": nonconformitant,
+        "Poinsettia": poinsettia,
+        "putatively": putatively,
+        "semivolatile": semivolatile,
+        "soleas": soleas,
+        "unfastenable": unfastenable,
+        "unmillinered": unmillinered,
+    };
+}
+
+class FenkClass {
+    dynamic apoise;
+    dynamic astronomize;
+    dynamic cockhorse;
+    dynamic copular;
+    dynamic dagomba;
+    dynamic draffy;
+    dynamic foreigner;
+    dynamic guyandot;
+    dynamic neurogliosis;
+    dynamic osmious;
+    dynamic palpitate;
+    dynamic rebukeable;
+    dynamic reinwardtia;
+    dynamic reservatory;
+    dynamic scalt;
+    dynamic scripturalize;
+    dynamic tintometer;
+    dynamic tritoness;
+    dynamic undergrade;
+    dynamic undermountain;
+
+    FenkClass({
+        required this.apoise,
+        required this.astronomize,
+        required this.cockhorse,
+        required this.copular,
+        required this.dagomba,
+        required this.draffy,
+        required this.foreigner,
+        required this.guyandot,
+        required this.neurogliosis,
+        required this.osmious,
+        required this.palpitate,
+        required this.rebukeable,
+        required this.reinwardtia,
+        required this.reservatory,
+        required this.scalt,
+        required this.scripturalize,
+        required this.tintometer,
+        required this.tritoness,
+        required this.undergrade,
+        required this.undermountain,
+    });
+
+    factory FenkClass.fromJson(Map<String, dynamic> json) => FenkClass(
+        apoise: json["apoise"],
+        astronomize: json["astronomize"],
+        cockhorse: json["cockhorse"],
+        copular: json["copular"],
+        dagomba: json["Dagomba"],
+        draffy: json["draffy"],
+        foreigner: json["foreigner"],
+        guyandot: json["Guyandot"],
+        neurogliosis: json["neurogliosis"],
+        osmious: json["osmious"],
+        palpitate: json["palpitate"],
+        rebukeable: json["rebukeable"],
+        reinwardtia: json["Reinwardtia"],
+        reservatory: json["reservatory"],
+        scalt: json["scalt"],
+        scripturalize: json["scripturalize"],
+        tintometer: json["tintometer"],
+        tritoness: json["Tritoness"],
+        undergrade: json["undergrade"],
+        undermountain: json["undermountain"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "apoise": apoise,
+        "astronomize": astronomize,
+        "cockhorse": cockhorse,
+        "copular": copular,
+        "Dagomba": dagomba,
+        "draffy": draffy,
+        "foreigner": foreigner,
+        "Guyandot": guyandot,
+        "neurogliosis": neurogliosis,
+        "osmious": osmious,
+        "palpitate": palpitate,
+        "rebukeable": rebukeable,
+        "Reinwardtia": reinwardtia,
+        "reservatory": reservatory,
+        "scalt": scalt,
+        "scripturalize": scripturalize,
+        "tintometer": tintometer,
+        "Tritoness": tritoness,
+        "undergrade": undergrade,
+        "undermountain": undermountain,
+    };
+}
+
+class FlagmakingClass {
+    dynamic albarco;
+    dynamic bunodonta;
+    dynamic hornify;
+    dynamic hydrocorisae;
+    dynamic hypoglossus;
+    dynamic inexpiably;
+    dynamic ingratitude;
+    dynamic ladyfly;
+    dynamic medicament;
+    dynamic monogrammatic;
+    dynamic nobbut;
+    dynamic notacanthidae;
+    dynamic polyplacophore;
+    dynamic proexercise;
+    dynamic protoplast;
+    dynamic puzzling;
+    dynamic splanchnoskeleton;
+    dynamic unloveliness;
+    dynamic unquarantined;
+    dynamic unrenounceable;
+
+    FlagmakingClass({
+        required this.albarco,
+        required this.bunodonta,
+        required this.hornify,
+        required this.hydrocorisae,
+        required this.hypoglossus,
+        required this.inexpiably,
+        required this.ingratitude,
+        required this.ladyfly,
+        required this.medicament,
+        required this.monogrammatic,
+        required this.nobbut,
+        required this.notacanthidae,
+        required this.polyplacophore,
+        required this.proexercise,
+        required this.protoplast,
+        required this.puzzling,
+        required this.splanchnoskeleton,
+        required this.unloveliness,
+        required this.unquarantined,
+        required this.unrenounceable,
+    });
+
+    factory FlagmakingClass.fromJson(Map<String, dynamic> json) => FlagmakingClass(
+        albarco: json["albarco"],
+        bunodonta: json["Bunodonta"],
+        hornify: json["hornify"],
+        hydrocorisae: json["Hydrocorisae"],
+        hypoglossus: json["hypoglossus"],
+        inexpiably: json["inexpiably"],
+        ingratitude: json["ingratitude"],
+        ladyfly: json["ladyfly"],
+        medicament: json["medicament"],
+        monogrammatic: json["monogrammatic"],
+        nobbut: json["nobbut"],
+        notacanthidae: json["Notacanthidae"],
+        polyplacophore: json["polyplacophore"],
+        proexercise: json["proexercise"],
+        protoplast: json["protoplast"],
+        puzzling: json["puzzling"],
+        splanchnoskeleton: json["splanchnoskeleton"],
+        unloveliness: json["unloveliness"],
+        unquarantined: json["unquarantined"],
+        unrenounceable: json["unrenounceable"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "albarco": albarco,
+        "Bunodonta": bunodonta,
+        "hornify": hornify,
+        "Hydrocorisae": hydrocorisae,
+        "hypoglossus": hypoglossus,
+        "inexpiably": inexpiably,
+        "ingratitude": ingratitude,
+        "ladyfly": ladyfly,
+        "medicament": medicament,
+        "monogrammatic": monogrammatic,
+        "nobbut": nobbut,
+        "Notacanthidae": notacanthidae,
+        "polyplacophore": polyplacophore,
+        "proexercise": proexercise,
+        "protoplast": protoplast,
+        "puzzling": puzzling,
+        "splanchnoskeleton": splanchnoskeleton,
+        "unloveliness": unloveliness,
+        "unquarantined": unquarantined,
+        "unrenounceable": unrenounceable,
+    };
+}
+
+class HemocoeleClass {
+    dynamic acrogamy;
+    dynamic amelification;
+    dynamic autobiographic;
+    dynamic berat;
+    double? catharticalness;
+    int? chirotherium;
+    String? disdiapason;
+    dynamic disproportionably;
+    dynamic erythrite;
+    dynamic graphic;
+    dynamic hepatological;
+    bool? homocerc;
+    dynamic incommensurably;
+    dynamic misaffirm;
+    dynamic nonbookish;
+    dynamic pocketbook;
+    dynamic sclerometric;
+    dynamic stambouline;
+    dynamic stickpin;
+    dynamic tubulure;
+    dynamic undelated;
+    dynamic unsalt;
+    dynamic untutelar;
+    dynamic vagrant;
+    dynamic walt;
+
+    HemocoeleClass({
+        this.acrogamy,
+        this.amelification,
+        this.autobiographic,
+        this.berat,
+        this.catharticalness,
+        this.chirotherium,
+        this.disdiapason,
+        this.disproportionably,
+        this.erythrite,
+        this.graphic,
+        this.hepatological,
+        this.homocerc,
+        this.incommensurably,
+        this.misaffirm,
+        this.nonbookish,
+        this.pocketbook,
+        this.sclerometric,
+        this.stambouline,
+        this.stickpin,
+        this.tubulure,
+        this.undelated,
+        this.unsalt,
+        this.untutelar,
+        this.vagrant,
+        this.walt,
+    });
+
+    factory HemocoeleClass.fromJson(Map<String, dynamic> json) => HemocoeleClass(
+        acrogamy: json["acrogamy"],
+        amelification: json["amelification"],
+        autobiographic: json["autobiographic"],
+        berat: json["berat"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        disproportionably: json["disproportionably"],
+        erythrite: json["erythrite"],
+        graphic: json["graphic"],
+        hepatological: json["hepatological"],
+        homocerc: json["homocerc"],
+        incommensurably: json["incommensurably"],
+        misaffirm: json["misaffirm"],
+        nonbookish: json["nonbookish"],
+        pocketbook: json["pocketbook"],
+        sclerometric: json["sclerometric"],
+        stambouline: json["stambouline"],
+        stickpin: json["stickpin"],
+        tubulure: json["tubulure"],
+        undelated: json["undelated"],
+        unsalt: json["unsalt"],
+        untutelar: json["untutelar"],
+        vagrant: json["vagrant"],
+        walt: json["Walt"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "acrogamy": acrogamy,
+        "amelification": amelification,
+        "autobiographic": autobiographic,
+        "berat": berat,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "disproportionably": disproportionably,
+        "erythrite": erythrite,
+        "graphic": graphic,
+        "hepatological": hepatological,
+        "homocerc": homocerc,
+        "incommensurably": incommensurably,
+        "misaffirm": misaffirm,
+        "nonbookish": nonbookish,
+        "pocketbook": pocketbook,
+        "sclerometric": sclerometric,
+        "stambouline": stambouline,
+        "stickpin": stickpin,
+        "tubulure": tubulure,
+        "undelated": undelated,
+        "unsalt": unsalt,
+        "untutelar": untutelar,
+        "vagrant": vagrant,
+        "Walt": walt,
+    };
+}
+
+class Interacinar {
+    double assapan;
+    bool benefactorship;
+    String triseriatim;
+    int tubbing;
+    dynamic untrimmed;
+
+    Interacinar({
+        required this.assapan,
+        required this.benefactorship,
+        required this.triseriatim,
+        required this.tubbing,
+        required this.untrimmed,
+    });
+
+    factory Interacinar.fromJson(Map<String, dynamic> json) => Interacinar(
+        assapan: json["assapan"]?.toDouble(),
+        benefactorship: json["benefactorship"],
+        triseriatim: json["triseriatim"],
+        tubbing: json["tubbing"],
+        untrimmed: json["untrimmed"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "assapan": assapan,
+        "benefactorship": benefactorship,
+        "triseriatim": triseriatim,
+        "tubbing": tubbing,
+        "untrimmed": untrimmed,
+    };
+}
diff --git a/head/dart/test/inputs/json/priority/combinations2.json/default/TopLevel.dart b/head/dart/test/inputs/json/priority/combinations2.json/default/TopLevel.dart
new file mode 100644
index 0000000..4af4d1e
--- /dev/null
+++ b/head/dart/test/inputs/json/priority/combinations2.json/default/TopLevel.dart
@@ -0,0 +1,1121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final List<dynamic> abranchiata;
+    final List<dynamic> academe;
+    final List<dynamic> acquirable;
+    final List<dynamic> aerometry;
+    final List<dynamic> alexin;
+    final List<dynamic> alleviate;
+    final List<dynamic> amaas;
+    final List<dynamic> ambassage;
+    final List<Amphithyron?> amphithyron;
+    final List<String?> andriana;
+    final List<dynamic> ankee;
+    final List<Map<String, int?>?> annihilator;
+    final dynamic annulose;
+    final List<dynamic> ansarie;
+    final List<dynamic> aphasia;
+    final List<dynamic> asprawl;
+    final List<bool?> attractive;
+    final Map<String, int> barksome;
+    final List<dynamic> bedesman;
+    final List<dynamic> belard;
+    final List<dynamic> bocking;
+    final List<dynamic> brawlingly;
+    final List<dynamic> brookie;
+    final List<dynamic> bumboatman;
+    final List<dynamic> bystreet;
+    final List<dynamic> calaverite;
+    final List<dynamic> catallactic;
+    final List<dynamic> cemental;
+    final List<dynamic> chytridiaceae;
+    final List<dynamic> discordia;
+    final List<dynamic> endomyces;
+    final List<dynamic> epinephelidae;
+    final List<dynamic> eupatorium;
+    final List<dynamic> gryphosaurus;
+    final List<dynamic> koryak;
+    final List<dynamic> lavinia;
+    final List<dynamic> oskar;
+    final List<dynamic> rebecca;
+    final List<dynamic> rhomboganoidei;
+    final bool rigsmal;
+    final List<dynamic> ruellia;
+    final List<dynamic> school;
+    final List<dynamic> shakespearolater;
+    final List<double> svan;
+    final Map<String, double> wayao;
+
+    TopLevel({
+        required this.abranchiata,
+        required this.academe,
+        required this.acquirable,
+        required this.aerometry,
+        required this.alexin,
+        required this.alleviate,
+        required this.amaas,
+        required this.ambassage,
+        required this.amphithyron,
+        required this.andriana,
+        required this.ankee,
+        required this.annihilator,
+        required this.annulose,
+        required this.ansarie,
+        required this.aphasia,
+        required this.asprawl,
+        required this.attractive,
+        required this.barksome,
+        required this.bedesman,
+        required this.belard,
+        required this.bocking,
+        required this.brawlingly,
+        required this.brookie,
+        required this.bumboatman,
+        required this.bystreet,
+        required this.calaverite,
+        required this.catallactic,
+        required this.cemental,
+        required this.chytridiaceae,
+        required this.discordia,
+        required this.endomyces,
+        required this.epinephelidae,
+        required this.eupatorium,
+        required this.gryphosaurus,
+        required this.koryak,
+        required this.lavinia,
+        required this.oskar,
+        required this.rebecca,
+        required this.rhomboganoidei,
+        required this.rigsmal,
+        required this.ruellia,
+        required this.school,
+        required this.shakespearolater,
+        required this.svan,
+        required this.wayao,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        abranchiata: List<dynamic>.from(json["Abranchiata"].map((x) => x)),
+        academe: List<dynamic>.from(json["academe"].map((x) => x)),
+        acquirable: List<dynamic>.from(json["acquirable"].map((x) => x)),
+        aerometry: List<dynamic>.from(json["aerometry"].map((x) => x)),
+        alexin: List<dynamic>.from(json["alexin"].map((x) => x)),
+        alleviate: List<dynamic>.from(json["alleviate"].map((x) => x)),
+        amaas: List<dynamic>.from(json["amaas"].map((x) => x)),
+        ambassage: List<dynamic>.from(json["ambassage"].map((x) => x)),
+        amphithyron: List<Amphithyron?>.from(json["amphithyron"].map((x) => x == null ? null : Amphithyron.fromJson(x))),
+        andriana: List<String?>.from(json["Andriana"].map((x) => x)),
+        ankee: List<dynamic>.from(json["ankee"].map((x) => x)),
+        annihilator: List<Map<String, int?>?>.from(json["annihilator"].map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, int?>(k, v)))),
+        annulose: json["annulose"],
+        ansarie: List<dynamic>.from(json["Ansarie"].map((x) => x)),
+        aphasia: List<dynamic>.from(json["aphasia"].map((x) => x)),
+        asprawl: List<dynamic>.from(json["asprawl"].map((x) => x)),
+        attractive: List<bool?>.from(json["attractive"].map((x) => x)),
+        barksome: Map.from(json["barksome"]).map((k, v) => MapEntry<String, int>(k, v)),
+        bedesman: List<dynamic>.from(json["bedesman"].map((x) => x)),
+        belard: List<dynamic>.from(json["belard"].map((x) => x)),
+        bocking: List<dynamic>.from(json["bocking"].map((x) => x)),
+        brawlingly: List<dynamic>.from(json["brawlingly"].map((x) => x)),
+        brookie: List<dynamic>.from(json["brookie"].map((x) => x)),
+        bumboatman: List<dynamic>.from(json["bumboatman"].map((x) => x)),
+        bystreet: List<dynamic>.from(json["bystreet"].map((x) => x)),
+        calaverite: List<dynamic>.from(json["calaverite"].map((x) => x)),
+        catallactic: List<dynamic>.from(json["catallactic"].map((x) => x)),
+        cemental: List<dynamic>.from(json["cemental"].map((x) => x)),
+        chytridiaceae: List<dynamic>.from(json["Chytridiaceae"].map((x) => x)),
+        discordia: List<dynamic>.from(json["Discordia"].map((x) => x)),
+        endomyces: List<dynamic>.from(json["Endomyces"].map((x) => x)),
+        epinephelidae: List<dynamic>.from(json["Epinephelidae"].map((x) => x)),
+        eupatorium: List<dynamic>.from(json["Eupatorium"].map((x) => x)),
+        gryphosaurus: List<dynamic>.from(json["Gryphosaurus"].map((x) => x)),
+        koryak: List<dynamic>.from(json["Koryak"].map((x) => x)),
+        lavinia: List<dynamic>.from(json["Lavinia"].map((x) => x)),
+        oskar: List<dynamic>.from(json["Oskar"].map((x) => x)),
+        rebecca: List<dynamic>.from(json["Rebecca"].map((x) => x)),
+        rhomboganoidei: List<dynamic>.from(json["Rhomboganoidei"].map((x) => x)),
+        rigsmal: json["Rigsmal"],
+        ruellia: List<dynamic>.from(json["Ruellia"].map((x) => x)),
+        school: List<dynamic>.from(json["School"].map((x) => x)),
+        shakespearolater: List<dynamic>.from(json["Shakespearolater"].map((x) => x)),
+        svan: List<double>.from(json["Svan"].map((x) => x?.toDouble())),
+        wayao: Map.from(json["Wayao"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Abranchiata": List<dynamic>.from(abranchiata.map((x) => x)),
+        "academe": List<dynamic>.from(academe.map((x) => x)),
+        "acquirable": List<dynamic>.from(acquirable.map((x) => x)),
+        "aerometry": List<dynamic>.from(aerometry.map((x) => x)),
+        "alexin": List<dynamic>.from(alexin.map((x) => x)),
+        "alleviate": List<dynamic>.from(alleviate.map((x) => x)),
+        "amaas": List<dynamic>.from(amaas.map((x) => x)),
+        "ambassage": List<dynamic>.from(ambassage.map((x) => x)),
+        "amphithyron": List<dynamic>.from(amphithyron.map((x) => x?.toJson())),
+        "Andriana": List<dynamic>.from(andriana.map((x) => x)),
+        "ankee": List<dynamic>.from(ankee.map((x) => x)),
+        "annihilator": List<dynamic>.from(annihilator.map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, dynamic>(k, v)))),
+        "annulose": annulose,
+        "Ansarie": List<dynamic>.from(ansarie.map((x) => x)),
+        "aphasia": List<dynamic>.from(aphasia.map((x) => x)),
+        "asprawl": List<dynamic>.from(asprawl.map((x) => x)),
+        "attractive": List<dynamic>.from(attractive.map((x) => x)),
+        "barksome": Map.from(barksome).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "bedesman": List<dynamic>.from(bedesman.map((x) => x)),
+        "belard": List<dynamic>.from(belard.map((x) => x)),
+        "bocking": List<dynamic>.from(bocking.map((x) => x)),
+        "brawlingly": List<dynamic>.from(brawlingly.map((x) => x)),
+        "brookie": List<dynamic>.from(brookie.map((x) => x)),
+        "bumboatman": List<dynamic>.from(bumboatman.map((x) => x)),
+        "bystreet": List<dynamic>.from(bystreet.map((x) => x)),
+        "calaverite": List<dynamic>.from(calaverite.map((x) => x)),
+        "catallactic": List<dynamic>.from(catallactic.map((x) => x)),
+        "cemental": List<dynamic>.from(cemental.map((x) => x)),
+        "Chytridiaceae": List<dynamic>.from(chytridiaceae.map((x) => x)),
+        "Discordia": List<dynamic>.from(discordia.map((x) => x)),
+        "Endomyces": List<dynamic>.from(endomyces.map((x) => x)),
+        "Epinephelidae": List<dynamic>.from(epinephelidae.map((x) => x)),
+        "Eupatorium": List<dynamic>.from(eupatorium.map((x) => x)),
+        "Gryphosaurus": List<dynamic>.from(gryphosaurus.map((x) => x)),
+        "Koryak": List<dynamic>.from(koryak.map((x) => x)),
+        "Lavinia": List<dynamic>.from(lavinia.map((x) => x)),
+        "Oskar": List<dynamic>.from(oskar.map((x) => x)),
+        "Rebecca": List<dynamic>.from(rebecca.map((x) => x)),
+        "Rhomboganoidei": List<dynamic>.from(rhomboganoidei.map((x) => x)),
+        "Rigsmal": rigsmal,
+        "Ruellia": List<dynamic>.from(ruellia.map((x) => x)),
+        "School": List<dynamic>.from(school.map((x) => x)),
+        "Shakespearolater": List<dynamic>.from(shakespearolater.map((x) => x)),
+        "Svan": List<dynamic>.from(svan.map((x) => x)),
+        "Wayao": Map.from(wayao).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
+
+class AlleviateClass {
+    final dynamic apriori;
+    final dynamic beggarer;
+    final dynamic brokenheartedly;
+    final dynamic debilitation;
+    final dynamic frike;
+    final dynamic gastrolith;
+    final dynamic hulsean;
+    final dynamic orthocentric;
+    final dynamic petaly;
+    final dynamic probudgeting;
+    final dynamic reacquire;
+    final dynamic scow;
+    final dynamic shutoff;
+    final dynamic subcontiguous;
+    final dynamic suffumigate;
+    final dynamic transformable;
+    final dynamic uncoroneted;
+    final dynamic unparking;
+    final dynamic unvarnishedness;
+    final dynamic wherewithal;
+
+    AlleviateClass({
+        required this.apriori,
+        required this.beggarer,
+        required this.brokenheartedly,
+        required this.debilitation,
+        required this.frike,
+        required this.gastrolith,
+        required this.hulsean,
+        required this.orthocentric,
+        required this.petaly,
+        required this.probudgeting,
+        required this.reacquire,
+        required this.scow,
+        required this.shutoff,
+        required this.subcontiguous,
+        required this.suffumigate,
+        required this.transformable,
+        required this.uncoroneted,
+        required this.unparking,
+        required this.unvarnishedness,
+        required this.wherewithal,
+    });
+
+    factory AlleviateClass.fromJson(Map<String, dynamic> json) => AlleviateClass(
+        apriori: json["apriori"],
+        beggarer: json["beggarer"],
+        brokenheartedly: json["brokenheartedly"],
+        debilitation: json["debilitation"],
+        frike: json["frike"],
+        gastrolith: json["gastrolith"],
+        hulsean: json["Hulsean"],
+        orthocentric: json["orthocentric"],
+        petaly: json["petaly"],
+        probudgeting: json["probudgeting"],
+        reacquire: json["reacquire"],
+        scow: json["scow"],
+        shutoff: json["shutoff"],
+        subcontiguous: json["subcontiguous"],
+        suffumigate: json["suffumigate"],
+        transformable: json["transformable"],
+        uncoroneted: json["uncoroneted"],
+        unparking: json["unparking"],
+        unvarnishedness: json["unvarnishedness"],
+        wherewithal: json["wherewithal"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "apriori": apriori,
+        "beggarer": beggarer,
+        "brokenheartedly": brokenheartedly,
+        "debilitation": debilitation,
+        "frike": frike,
+        "gastrolith": gastrolith,
+        "Hulsean": hulsean,
+        "orthocentric": orthocentric,
+        "petaly": petaly,
+        "probudgeting": probudgeting,
+        "reacquire": reacquire,
+        "scow": scow,
+        "shutoff": shutoff,
+        "subcontiguous": subcontiguous,
+        "suffumigate": suffumigate,
+        "transformable": transformable,
+        "uncoroneted": uncoroneted,
+        "unparking": unparking,
+        "unvarnishedness": unvarnishedness,
+        "wherewithal": wherewithal,
+    };
+}
+
+class Rebecca {
+    final double catharticalness;
+    final int chirotherium;
+    final String disdiapason;
+    final bool homocerc;
+    final dynamic nonbookish;
+
+    Rebecca({
+        required this.catharticalness,
+        required this.chirotherium,
+        required this.disdiapason,
+        required this.homocerc,
+        required this.nonbookish,
+    });
+
+    factory Rebecca.fromJson(Map<String, dynamic> json) => Rebecca(
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        homocerc: json["homocerc"],
+        nonbookish: json["nonbookish"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "homocerc": homocerc,
+        "nonbookish": nonbookish,
+    };
+}
+
+class Amphithyron {
+    final int? akroasis;
+    final int? antiphonical;
+    final int? basebred;
+    final double? catharticalness;
+    final int? chirotherium;
+    final int? conductometric;
+    final String? disdiapason;
+    final int? ensilation;
+    final int? eyebolt;
+    final int? fistulated;
+    final int? heteropod;
+    final bool? homocerc;
+    final int? juniperus;
+    final int? labyrinthically;
+    final int? martyrization;
+    final int? mispolicy;
+    final int? multipara;
+    final int? nazirite;
+    final dynamic nonbookish;
+    final int? possessorial;
+    final int? shamed;
+    final int? shelfworn;
+    final int? stagnum;
+    final int? those;
+    final int? undecimal;
+
+    Amphithyron({
+        this.akroasis,
+        this.antiphonical,
+        this.basebred,
+        this.catharticalness,
+        this.chirotherium,
+        this.conductometric,
+        this.disdiapason,
+        this.ensilation,
+        this.eyebolt,
+        this.fistulated,
+        this.heteropod,
+        this.homocerc,
+        this.juniperus,
+        this.labyrinthically,
+        this.martyrization,
+        this.mispolicy,
+        this.multipara,
+        this.nazirite,
+        this.nonbookish,
+        this.possessorial,
+        this.shamed,
+        this.shelfworn,
+        this.stagnum,
+        this.those,
+        this.undecimal,
+    });
+
+    factory Amphithyron.fromJson(Map<String, dynamic> json) => Amphithyron(
+        akroasis: json["akroasis"],
+        antiphonical: json["antiphonical"],
+        basebred: json["basebred"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        conductometric: json["conductometric"],
+        disdiapason: json["disdiapason"],
+        ensilation: json["ensilation"],
+        eyebolt: json["eyebolt"],
+        fistulated: json["fistulated"],
+        heteropod: json["heteropod"],
+        homocerc: json["homocerc"],
+        juniperus: json["Juniperus"],
+        labyrinthically: json["labyrinthically"],
+        martyrization: json["martyrization"],
+        mispolicy: json["mispolicy"],
+        multipara: json["multipara"],
+        nazirite: json["Nazirite"],
+        nonbookish: json["nonbookish"],
+        possessorial: json["possessorial"],
+        shamed: json["shamed"],
+        shelfworn: json["shelfworn"],
+        stagnum: json["stagnum"],
+        those: json["Those"],
+        undecimal: json["undecimal"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "akroasis": akroasis,
+        "antiphonical": antiphonical,
+        "basebred": basebred,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "conductometric": conductometric,
+        "disdiapason": disdiapason,
+        "ensilation": ensilation,
+        "eyebolt": eyebolt,
+        "fistulated": fistulated,
+        "heteropod": heteropod,
+        "homocerc": homocerc,
+        "Juniperus": juniperus,
+        "labyrinthically": labyrinthically,
+        "martyrization": martyrization,
+        "mispolicy": mispolicy,
+        "multipara": multipara,
+        "Nazirite": nazirite,
+        "nonbookish": nonbookish,
+        "possessorial": possessorial,
+        "shamed": shamed,
+        "shelfworn": shelfworn,
+        "stagnum": stagnum,
+        "Those": those,
+        "undecimal": undecimal,
+    };
+}
+
+class AnkeeClass {
+    final dynamic anomoean;
+    final dynamic barleyhood;
+    final dynamic befriender;
+    final dynamic brutishness;
+    final dynamic cephalalgy;
+    final dynamic cirurgian;
+    final dynamic conventionally;
+    final dynamic jackshay;
+    final dynamic milammeter;
+    final dynamic naja;
+    final dynamic ombrological;
+    final dynamic phonasthenia;
+    final dynamic retrievableness;
+    final dynamic snakily;
+    final dynamic swot;
+    final dynamic tartlet;
+    final dynamic thiofuran;
+    final dynamic tracheophone;
+    final dynamic tuglike;
+    final dynamic unscratchingly;
+
+    AnkeeClass({
+        required this.anomoean,
+        required this.barleyhood,
+        required this.befriender,
+        required this.brutishness,
+        required this.cephalalgy,
+        required this.cirurgian,
+        required this.conventionally,
+        required this.jackshay,
+        required this.milammeter,
+        required this.naja,
+        required this.ombrological,
+        required this.phonasthenia,
+        required this.retrievableness,
+        required this.snakily,
+        required this.swot,
+        required this.tartlet,
+        required this.thiofuran,
+        required this.tracheophone,
+        required this.tuglike,
+        required this.unscratchingly,
+    });
+
+    factory AnkeeClass.fromJson(Map<String, dynamic> json) => AnkeeClass(
+        anomoean: json["Anomoean"],
+        barleyhood: json["barleyhood"],
+        befriender: json["befriender"],
+        brutishness: json["brutishness"],
+        cephalalgy: json["cephalalgy"],
+        cirurgian: json["cirurgian"],
+        conventionally: json["conventionally"],
+        jackshay: json["jackshay"],
+        milammeter: json["milammeter"],
+        naja: json["Naja"],
+        ombrological: json["ombrological"],
+        phonasthenia: json["phonasthenia"],
+        retrievableness: json["retrievableness"],
+        snakily: json["snakily"],
+        swot: json["swot"],
+        tartlet: json["tartlet"],
+        thiofuran: json["thiofuran"],
+        tracheophone: json["tracheophone"],
+        tuglike: json["tuglike"],
+        unscratchingly: json["unscratchingly"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Anomoean": anomoean,
+        "barleyhood": barleyhood,
+        "befriender": befriender,
+        "brutishness": brutishness,
+        "cephalalgy": cephalalgy,
+        "cirurgian": cirurgian,
+        "conventionally": conventionally,
+        "jackshay": jackshay,
+        "milammeter": milammeter,
+        "Naja": naja,
+        "ombrological": ombrological,
+        "phonasthenia": phonasthenia,
+        "retrievableness": retrievableness,
+        "snakily": snakily,
+        "swot": swot,
+        "tartlet": tartlet,
+        "thiofuran": thiofuran,
+        "tracheophone": tracheophone,
+        "tuglike": tuglike,
+        "unscratchingly": unscratchingly,
+    };
+}
+
+class AnsarieClass {
+    final dynamic accension;
+    final dynamic alida;
+    final dynamic asteria;
+    final dynamic beriberic;
+    final dynamic edgebone;
+    final dynamic gastrodialysis;
+    final dynamic geographic;
+    final dynamic ictonyx;
+    final dynamic metrocele;
+    final dynamic misgraft;
+    final dynamic monteith;
+    final dynamic notcher;
+    final dynamic prorestriction;
+    final dynamic ramist;
+    final dynamic throatlet;
+    final dynamic unfair;
+    final dynamic unsynonymous;
+    final dynamic water;
+    final dynamic zestfully;
+    final dynamic zincic;
+
+    AnsarieClass({
+        required this.accension,
+        required this.alida,
+        required this.asteria,
+        required this.beriberic,
+        required this.edgebone,
+        required this.gastrodialysis,
+        required this.geographic,
+        required this.ictonyx,
+        required this.metrocele,
+        required this.misgraft,
+        required this.monteith,
+        required this.notcher,
+        required this.prorestriction,
+        required this.ramist,
+        required this.throatlet,
+        required this.unfair,
+        required this.unsynonymous,
+        required this.water,
+        required this.zestfully,
+        required this.zincic,
+    });
+
+    factory AnsarieClass.fromJson(Map<String, dynamic> json) => AnsarieClass(
+        accension: json["accension"],
+        alida: json["Alida"],
+        asteria: json["asteria"],
+        beriberic: json["beriberic"],
+        edgebone: json["edgebone"],
+        gastrodialysis: json["gastrodialysis"],
+        geographic: json["geographic"],
+        ictonyx: json["Ictonyx"],
+        metrocele: json["metrocele"],
+        misgraft: json["misgraft"],
+        monteith: json["monteith"],
+        notcher: json["notcher"],
+        prorestriction: json["prorestriction"],
+        ramist: json["Ramist"],
+        throatlet: json["throatlet"],
+        unfair: json["unfair"],
+        unsynonymous: json["unsynonymous"],
+        water: json["water"],
+        zestfully: json["zestfully"],
+        zincic: json["zincic"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "accension": accension,
+        "Alida": alida,
+        "asteria": asteria,
+        "beriberic": beriberic,
+        "edgebone": edgebone,
+        "gastrodialysis": gastrodialysis,
+        "geographic": geographic,
+        "Ictonyx": ictonyx,
+        "metrocele": metrocele,
+        "misgraft": misgraft,
+        "monteith": monteith,
+        "notcher": notcher,
+        "prorestriction": prorestriction,
+        "Ramist": ramist,
+        "throatlet": throatlet,
+        "unfair": unfair,
+        "unsynonymous": unsynonymous,
+        "water": water,
+        "zestfully": zestfully,
+        "zincic": zincic,
+    };
+}
+
+class ChytridiaceaeClass {
+    final dynamic batidaceae;
+    final dynamic brechites;
+    final dynamic codespairer;
+    final dynamic emery;
+    final dynamic enervative;
+    final dynamic excriminate;
+    final dynamic goshenite;
+    final dynamic grime;
+    final dynamic gritten;
+    final dynamic hectorly;
+    final dynamic intermediation;
+    final dynamic meeterly;
+    final dynamic narraganset;
+    final dynamic onymatic;
+    final dynamic paddlecock;
+    final dynamic thana;
+    final dynamic thornily;
+    final dynamic uckia;
+    final dynamic unmettle;
+    final dynamic vorticellid;
+
+    ChytridiaceaeClass({
+        required this.batidaceae,
+        required this.brechites,
+        required this.codespairer,
+        required this.emery,
+        required this.enervative,
+        required this.excriminate,
+        required this.goshenite,
+        required this.grime,
+        required this.gritten,
+        required this.hectorly,
+        required this.intermediation,
+        required this.meeterly,
+        required this.narraganset,
+        required this.onymatic,
+        required this.paddlecock,
+        required this.thana,
+        required this.thornily,
+        required this.uckia,
+        required this.unmettle,
+        required this.vorticellid,
+    });
+
+    factory ChytridiaceaeClass.fromJson(Map<String, dynamic> json) => ChytridiaceaeClass(
+        batidaceae: json["Batidaceae"],
+        brechites: json["Brechites"],
+        codespairer: json["codespairer"],
+        emery: json["Emery"],
+        enervative: json["enervative"],
+        excriminate: json["excriminate"],
+        goshenite: json["goshenite"],
+        grime: json["grime"],
+        gritten: json["gritten"],
+        hectorly: json["hectorly"],
+        intermediation: json["intermediation"],
+        meeterly: json["meeterly"],
+        narraganset: json["Narraganset"],
+        onymatic: json["onymatic"],
+        paddlecock: json["paddlecock"],
+        thana: json["thana"],
+        thornily: json["thornily"],
+        uckia: json["uckia"],
+        unmettle: json["unmettle"],
+        vorticellid: json["vorticellid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Batidaceae": batidaceae,
+        "Brechites": brechites,
+        "codespairer": codespairer,
+        "Emery": emery,
+        "enervative": enervative,
+        "excriminate": excriminate,
+        "goshenite": goshenite,
+        "grime": grime,
+        "gritten": gritten,
+        "hectorly": hectorly,
+        "intermediation": intermediation,
+        "meeterly": meeterly,
+        "Narraganset": narraganset,
+        "onymatic": onymatic,
+        "paddlecock": paddlecock,
+        "thana": thana,
+        "thornily": thornily,
+        "uckia": uckia,
+        "unmettle": unmettle,
+        "vorticellid": vorticellid,
+    };
+}
+
+class DiscordiaClass {
+    final int? altaic;
+    final int? amoristic;
+    final int? blennophthalmia;
+    final double? catharticalness;
+    final int? chirotherium;
+    final int? disciplinability;
+    final String? disdiapason;
+    final int? goofer;
+    final bool? homocerc;
+    final int? laryngograph;
+    final int? leucitis;
+    final int? lymphocyst;
+    final int? microcosmology;
+    final int? nauseation;
+    final dynamic nonbookish;
+    final int? patarin;
+    final int? preliberal;
+    final int? prettifier;
+    final int? rangework;
+    final int? redient;
+    final int? subfusiform;
+    final int? suicidical;
+    final int? swow;
+    final int? wastrel;
+    final int? wingle;
+
+    DiscordiaClass({
+        this.altaic,
+        this.amoristic,
+        this.blennophthalmia,
+        this.catharticalness,
+        this.chirotherium,
+        this.disciplinability,
+        this.disdiapason,
+        this.goofer,
+        this.homocerc,
+        this.laryngograph,
+        this.leucitis,
+        this.lymphocyst,
+        this.microcosmology,
+        this.nauseation,
+        this.nonbookish,
+        this.patarin,
+        this.preliberal,
+        this.prettifier,
+        this.rangework,
+        this.redient,
+        this.subfusiform,
+        this.suicidical,
+        this.swow,
+        this.wastrel,
+        this.wingle,
+    });
+
+    factory DiscordiaClass.fromJson(Map<String, dynamic> json) => DiscordiaClass(
+        altaic: json["Altaic"],
+        amoristic: json["amoristic"],
+        blennophthalmia: json["blennophthalmia"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disciplinability: json["disciplinability"],
+        disdiapason: json["disdiapason"],
+        goofer: json["goofer"],
+        homocerc: json["homocerc"],
+        laryngograph: json["laryngograph"],
+        leucitis: json["leucitis"],
+        lymphocyst: json["lymphocyst"],
+        microcosmology: json["microcosmology"],
+        nauseation: json["nauseation"],
+        nonbookish: json["nonbookish"],
+        patarin: json["Patarin"],
+        preliberal: json["preliberal"],
+        prettifier: json["prettifier"],
+        rangework: json["rangework"],
+        redient: json["redient"],
+        subfusiform: json["subfusiform"],
+        suicidical: json["suicidical"],
+        swow: json["swow"],
+        wastrel: json["wastrel"],
+        wingle: json["wingle"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Altaic": altaic,
+        "amoristic": amoristic,
+        "blennophthalmia": blennophthalmia,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disciplinability": disciplinability,
+        "disdiapason": disdiapason,
+        "goofer": goofer,
+        "homocerc": homocerc,
+        "laryngograph": laryngograph,
+        "leucitis": leucitis,
+        "lymphocyst": lymphocyst,
+        "microcosmology": microcosmology,
+        "nauseation": nauseation,
+        "nonbookish": nonbookish,
+        "Patarin": patarin,
+        "preliberal": preliberal,
+        "prettifier": prettifier,
+        "rangework": rangework,
+        "redient": redient,
+        "subfusiform": subfusiform,
+        "suicidical": suicidical,
+        "swow": swow,
+        "wastrel": wastrel,
+        "wingle": wingle,
+    };
+}
+
+class GryphosaurusClass {
+    final dynamic amissibility;
+    final dynamic burushaski;
+    final dynamic citronin;
+    final dynamic coplaintiff;
+    final dynamic disquisitionary;
+    final dynamic enoplan;
+    final dynamic faintness;
+    final dynamic hebetomy;
+    final dynamic islandry;
+    final dynamic lameduck;
+    final dynamic overbattle;
+    final dynamic overinterested;
+    final dynamic phrenologic;
+    final dynamic rainband;
+    final dynamic shiningly;
+    final dynamic stamineous;
+    final dynamic subscapularis;
+    final dynamic tahami;
+    final dynamic undaubed;
+    final dynamic underntime;
+
+    GryphosaurusClass({
+        required this.amissibility,
+        required this.burushaski,
+        required this.citronin,
+        required this.coplaintiff,
+        required this.disquisitionary,
+        required this.enoplan,
+        required this.faintness,
+        required this.hebetomy,
+        required this.islandry,
+        required this.lameduck,
+        required this.overbattle,
+        required this.overinterested,
+        required this.phrenologic,
+        required this.rainband,
+        required this.shiningly,
+        required this.stamineous,
+        required this.subscapularis,
+        required this.tahami,
+        required this.undaubed,
+        required this.underntime,
+    });
+
+    factory GryphosaurusClass.fromJson(Map<String, dynamic> json) => GryphosaurusClass(
+        amissibility: json["amissibility"],
+        burushaski: json["Burushaski"],
+        citronin: json["citronin"],
+        coplaintiff: json["coplaintiff"],
+        disquisitionary: json["disquisitionary"],
+        enoplan: json["enoplan"],
+        faintness: json["faintness"],
+        hebetomy: json["hebetomy"],
+        islandry: json["islandry"],
+        lameduck: json["lameduck"],
+        overbattle: json["overbattle"],
+        overinterested: json["overinterested"],
+        phrenologic: json["phrenologic"],
+        rainband: json["rainband"],
+        shiningly: json["shiningly"],
+        stamineous: json["stamineous"],
+        subscapularis: json["subscapularis"],
+        tahami: json["Tahami"],
+        undaubed: json["undaubed"],
+        underntime: json["underntime"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "amissibility": amissibility,
+        "Burushaski": burushaski,
+        "citronin": citronin,
+        "coplaintiff": coplaintiff,
+        "disquisitionary": disquisitionary,
+        "enoplan": enoplan,
+        "faintness": faintness,
+        "hebetomy": hebetomy,
+        "islandry": islandry,
+        "lameduck": lameduck,
+        "overbattle": overbattle,
+        "overinterested": overinterested,
+        "phrenologic": phrenologic,
+        "rainband": rainband,
+        "shiningly": shiningly,
+        "stamineous": stamineous,
+        "subscapularis": subscapularis,
+        "Tahami": tahami,
+        "undaubed": undaubed,
+        "underntime": underntime,
+    };
+}
+
+class LaviniaClass {
+    final int? agitable;
+    final int? asininity;
+    final int? benefiter;
+    final int? bronzelike;
+    final double? catharticalness;
+    final int? chirotherium;
+    final int? cholesteatomatous;
+    final int? deprivement;
+    final String? disdiapason;
+    final int? flippantness;
+    final int? fogproof;
+    final bool? homocerc;
+    final int? merrymeeting;
+    final dynamic nonbookish;
+    final int? overcareful;
+    final int? panaris;
+    final int? preacceptance;
+    final int? quinoxaline;
+    final int? sig;
+    final int? superconfusion;
+    final int? tacana;
+    final int? tillotter;
+    final int? tranquillize;
+    final int? unquestionable;
+    final int? uproute;
+
+    LaviniaClass({
+        this.agitable,
+        this.asininity,
+        this.benefiter,
+        this.bronzelike,
+        this.catharticalness,
+        this.chirotherium,
+        this.cholesteatomatous,
+        this.deprivement,
+        this.disdiapason,
+        this.flippantness,
+        this.fogproof,
+        this.homocerc,
+        this.merrymeeting,
+        this.nonbookish,
+        this.overcareful,
+        this.panaris,
+        this.preacceptance,
+        this.quinoxaline,
+        this.sig,
+        this.superconfusion,
+        this.tacana,
+        this.tillotter,
+        this.tranquillize,
+        this.unquestionable,
+        this.uproute,
+    });
+
+    factory LaviniaClass.fromJson(Map<String, dynamic> json) => LaviniaClass(
+        agitable: json["agitable"],
+        asininity: json["asininity"],
+        benefiter: json["benefiter"],
+        bronzelike: json["bronzelike"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        cholesteatomatous: json["cholesteatomatous"],
+        deprivement: json["deprivement"],
+        disdiapason: json["disdiapason"],
+        flippantness: json["flippantness"],
+        fogproof: json["fogproof"],
+        homocerc: json["homocerc"],
+        merrymeeting: json["merrymeeting"],
+        nonbookish: json["nonbookish"],
+        overcareful: json["overcareful"],
+        panaris: json["panaris"],
+        preacceptance: json["preacceptance"],
+        quinoxaline: json["quinoxaline"],
+        sig: json["sig"],
+        superconfusion: json["superconfusion"],
+        tacana: json["Tacana"],
+        tillotter: json["tillotter"],
+        tranquillize: json["tranquillize"],
+        unquestionable: json["unquestionable"],
+        uproute: json["uproute"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "agitable": agitable,
+        "asininity": asininity,
+        "benefiter": benefiter,
+        "bronzelike": bronzelike,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "cholesteatomatous": cholesteatomatous,
+        "deprivement": deprivement,
+        "disdiapason": disdiapason,
+        "flippantness": flippantness,
+        "fogproof": fogproof,
+        "homocerc": homocerc,
+        "merrymeeting": merrymeeting,
+        "nonbookish": nonbookish,
+        "overcareful": overcareful,
+        "panaris": panaris,
+        "preacceptance": preacceptance,
+        "quinoxaline": quinoxaline,
+        "sig": sig,
+        "superconfusion": superconfusion,
+        "Tacana": tacana,
+        "tillotter": tillotter,
+        "tranquillize": tranquillize,
+        "unquestionable": unquestionable,
+        "uproute": uproute,
+    };
+}
+
+class OskarClass {
+    final dynamic acrobates;
+    final dynamic beanshooter;
+    final dynamic bearhound;
+    final dynamic cayuga;
+    final dynamic guarneri;
+    final dynamic hypochondriacism;
+    final dynamic indication;
+    final dynamic jaculative;
+    final dynamic nagana;
+    final dynamic netherlandish;
+    final dynamic noctivagous;
+    final dynamic nonphysiological;
+    final dynamic praxis;
+    final dynamic provision;
+    final dynamic subterhuman;
+    final dynamic sunlit;
+    final dynamic syncraniate;
+    final dynamic teachment;
+    final dynamic unmutinous;
+    final dynamic unstoppable;
+
+    OskarClass({
+        required this.acrobates,
+        required this.beanshooter,
+        required this.bearhound,
+        required this.cayuga,
+        required this.guarneri,
+        required this.hypochondriacism,
+        required this.indication,
+        required this.jaculative,
+        required this.nagana,
+        required this.netherlandish,
+        required this.noctivagous,
+        required this.nonphysiological,
+        required this.praxis,
+        required this.provision,
+        required this.subterhuman,
+        required this.sunlit,
+        required this.syncraniate,
+        required this.teachment,
+        required this.unmutinous,
+        required this.unstoppable,
+    });
+
+    factory OskarClass.fromJson(Map<String, dynamic> json) => OskarClass(
+        acrobates: json["Acrobates"],
+        beanshooter: json["beanshooter"],
+        bearhound: json["bearhound"],
+        cayuga: json["Cayuga"],
+        guarneri: json["guarneri"],
+        hypochondriacism: json["hypochondriacism"],
+        indication: json["indication"],
+        jaculative: json["jaculative"],
+        nagana: json["nagana"],
+        netherlandish: json["Netherlandish"],
+        noctivagous: json["noctivagous"],
+        nonphysiological: json["nonphysiological"],
+        praxis: json["praxis"],
+        provision: json["provision"],
+        subterhuman: json["subterhuman"],
+        sunlit: json["sunlit"],
+        syncraniate: json["syncraniate"],
+        teachment: json["teachment"],
+        unmutinous: json["unmutinous"],
+        unstoppable: json["unstoppable"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Acrobates": acrobates,
+        "beanshooter": beanshooter,
+        "bearhound": bearhound,
+        "Cayuga": cayuga,
+        "guarneri": guarneri,
+        "hypochondriacism": hypochondriacism,
+        "indication": indication,
+        "jaculative": jaculative,
+        "nagana": nagana,
+        "Netherlandish": netherlandish,
+        "noctivagous": noctivagous,
+        "nonphysiological": nonphysiological,
+        "praxis": praxis,
+        "provision": provision,
+        "subterhuman": subterhuman,
+        "sunlit": sunlit,
+        "syncraniate": syncraniate,
+        "teachment": teachment,
+        "unmutinous": unmutinous,
+        "unstoppable": unstoppable,
+    };
+}
diff --git a/head/dart/test/inputs/json/priority/combinations2.json/final-props-false--58a791807e0c/TopLevel.dart b/head/dart/test/inputs/json/priority/combinations2.json/final-props-false--58a791807e0c/TopLevel.dart
new file mode 100644
index 0000000..e021409
--- /dev/null
+++ b/head/dart/test/inputs/json/priority/combinations2.json/final-props-false--58a791807e0c/TopLevel.dart
@@ -0,0 +1,1121 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    List<dynamic> abranchiata;
+    List<dynamic> academe;
+    List<dynamic> acquirable;
+    List<dynamic> aerometry;
+    List<dynamic> alexin;
+    List<dynamic> alleviate;
+    List<dynamic> amaas;
+    List<dynamic> ambassage;
+    List<Amphithyron?> amphithyron;
+    List<String?> andriana;
+    List<dynamic> ankee;
+    List<Map<String, int?>?> annihilator;
+    dynamic annulose;
+    List<dynamic> ansarie;
+    List<dynamic> aphasia;
+    List<dynamic> asprawl;
+    List<bool?> attractive;
+    Map<String, int> barksome;
+    List<dynamic> bedesman;
+    List<dynamic> belard;
+    List<dynamic> bocking;
+    List<dynamic> brawlingly;
+    List<dynamic> brookie;
+    List<dynamic> bumboatman;
+    List<dynamic> bystreet;
+    List<dynamic> calaverite;
+    List<dynamic> catallactic;
+    List<dynamic> cemental;
+    List<dynamic> chytridiaceae;
+    List<dynamic> discordia;
+    List<dynamic> endomyces;
+    List<dynamic> epinephelidae;
+    List<dynamic> eupatorium;
+    List<dynamic> gryphosaurus;
+    List<dynamic> koryak;
+    List<dynamic> lavinia;
+    List<dynamic> oskar;
+    List<dynamic> rebecca;
+    List<dynamic> rhomboganoidei;
+    bool rigsmal;
+    List<dynamic> ruellia;
+    List<dynamic> school;
+    List<dynamic> shakespearolater;
+    List<double> svan;
+    Map<String, double> wayao;
+
+    TopLevel({
+        required this.abranchiata,
+        required this.academe,
+        required this.acquirable,
+        required this.aerometry,
+        required this.alexin,
+        required this.alleviate,
+        required this.amaas,
+        required this.ambassage,
+        required this.amphithyron,
+        required this.andriana,
+        required this.ankee,
+        required this.annihilator,
+        required this.annulose,
+        required this.ansarie,
+        required this.aphasia,
+        required this.asprawl,
+        required this.attractive,
+        required this.barksome,
+        required this.bedesman,
+        required this.belard,
+        required this.bocking,
+        required this.brawlingly,
+        required this.brookie,
+        required this.bumboatman,
+        required this.bystreet,
+        required this.calaverite,
+        required this.catallactic,
+        required this.cemental,
+        required this.chytridiaceae,
+        required this.discordia,
+        required this.endomyces,
+        required this.epinephelidae,
+        required this.eupatorium,
+        required this.gryphosaurus,
+        required this.koryak,
+        required this.lavinia,
+        required this.oskar,
+        required this.rebecca,
+        required this.rhomboganoidei,
+        required this.rigsmal,
+        required this.ruellia,
+        required this.school,
+        required this.shakespearolater,
+        required this.svan,
+        required this.wayao,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        abranchiata: List<dynamic>.from(json["Abranchiata"].map((x) => x)),
+        academe: List<dynamic>.from(json["academe"].map((x) => x)),
+        acquirable: List<dynamic>.from(json["acquirable"].map((x) => x)),
+        aerometry: List<dynamic>.from(json["aerometry"].map((x) => x)),
+        alexin: List<dynamic>.from(json["alexin"].map((x) => x)),
+        alleviate: List<dynamic>.from(json["alleviate"].map((x) => x)),
+        amaas: List<dynamic>.from(json["amaas"].map((x) => x)),
+        ambassage: List<dynamic>.from(json["ambassage"].map((x) => x)),
+        amphithyron: List<Amphithyron?>.from(json["amphithyron"].map((x) => x == null ? null : Amphithyron.fromJson(x))),
+        andriana: List<String?>.from(json["Andriana"].map((x) => x)),
+        ankee: List<dynamic>.from(json["ankee"].map((x) => x)),
+        annihilator: List<Map<String, int?>?>.from(json["annihilator"].map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, int?>(k, v)))),
+        annulose: json["annulose"],
+        ansarie: List<dynamic>.from(json["Ansarie"].map((x) => x)),
+        aphasia: List<dynamic>.from(json["aphasia"].map((x) => x)),
+        asprawl: List<dynamic>.from(json["asprawl"].map((x) => x)),
+        attractive: List<bool?>.from(json["attractive"].map((x) => x)),
+        barksome: Map.from(json["barksome"]).map((k, v) => MapEntry<String, int>(k, v)),
+        bedesman: List<dynamic>.from(json["bedesman"].map((x) => x)),
+        belard: List<dynamic>.from(json["belard"].map((x) => x)),
+        bocking: List<dynamic>.from(json["bocking"].map((x) => x)),
+        brawlingly: List<dynamic>.from(json["brawlingly"].map((x) => x)),
+        brookie: List<dynamic>.from(json["brookie"].map((x) => x)),
+        bumboatman: List<dynamic>.from(json["bumboatman"].map((x) => x)),
+        bystreet: List<dynamic>.from(json["bystreet"].map((x) => x)),
+        calaverite: List<dynamic>.from(json["calaverite"].map((x) => x)),
+        catallactic: List<dynamic>.from(json["catallactic"].map((x) => x)),
+        cemental: List<dynamic>.from(json["cemental"].map((x) => x)),
+        chytridiaceae: List<dynamic>.from(json["Chytridiaceae"].map((x) => x)),
+        discordia: List<dynamic>.from(json["Discordia"].map((x) => x)),
+        endomyces: List<dynamic>.from(json["Endomyces"].map((x) => x)),
+        epinephelidae: List<dynamic>.from(json["Epinephelidae"].map((x) => x)),
+        eupatorium: List<dynamic>.from(json["Eupatorium"].map((x) => x)),
+        gryphosaurus: List<dynamic>.from(json["Gryphosaurus"].map((x) => x)),
+        koryak: List<dynamic>.from(json["Koryak"].map((x) => x)),
+        lavinia: List<dynamic>.from(json["Lavinia"].map((x) => x)),
+        oskar: List<dynamic>.from(json["Oskar"].map((x) => x)),
+        rebecca: List<dynamic>.from(json["Rebecca"].map((x) => x)),
+        rhomboganoidei: List<dynamic>.from(json["Rhomboganoidei"].map((x) => x)),
+        rigsmal: json["Rigsmal"],
+        ruellia: List<dynamic>.from(json["Ruellia"].map((x) => x)),
+        school: List<dynamic>.from(json["School"].map((x) => x)),
+        shakespearolater: List<dynamic>.from(json["Shakespearolater"].map((x) => x)),
+        svan: List<double>.from(json["Svan"].map((x) => x?.toDouble())),
+        wayao: Map.from(json["Wayao"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Abranchiata": List<dynamic>.from(abranchiata.map((x) => x)),
+        "academe": List<dynamic>.from(academe.map((x) => x)),
+        "acquirable": List<dynamic>.from(acquirable.map((x) => x)),
+        "aerometry": List<dynamic>.from(aerometry.map((x) => x)),
+        "alexin": List<dynamic>.from(alexin.map((x) => x)),
+        "alleviate": List<dynamic>.from(alleviate.map((x) => x)),
+        "amaas": List<dynamic>.from(amaas.map((x) => x)),
+        "ambassage": List<dynamic>.from(ambassage.map((x) => x)),
+        "amphithyron": List<dynamic>.from(amphithyron.map((x) => x?.toJson())),
+        "Andriana": List<dynamic>.from(andriana.map((x) => x)),
+        "ankee": List<dynamic>.from(ankee.map((x) => x)),
+        "annihilator": List<dynamic>.from(annihilator.map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, dynamic>(k, v)))),
+        "annulose": annulose,
+        "Ansarie": List<dynamic>.from(ansarie.map((x) => x)),
+        "aphasia": List<dynamic>.from(aphasia.map((x) => x)),
+        "asprawl": List<dynamic>.from(asprawl.map((x) => x)),
+        "attractive": List<dynamic>.from(attractive.map((x) => x)),
+        "barksome": Map.from(barksome).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "bedesman": List<dynamic>.from(bedesman.map((x) => x)),
+        "belard": List<dynamic>.from(belard.map((x) => x)),
+        "bocking": List<dynamic>.from(bocking.map((x) => x)),
+        "brawlingly": List<dynamic>.from(brawlingly.map((x) => x)),
+        "brookie": List<dynamic>.from(brookie.map((x) => x)),
+        "bumboatman": List<dynamic>.from(bumboatman.map((x) => x)),
+        "bystreet": List<dynamic>.from(bystreet.map((x) => x)),
+        "calaverite": List<dynamic>.from(calaverite.map((x) => x)),
+        "catallactic": List<dynamic>.from(catallactic.map((x) => x)),
+        "cemental": List<dynamic>.from(cemental.map((x) => x)),
+        "Chytridiaceae": List<dynamic>.from(chytridiaceae.map((x) => x)),
+        "Discordia": List<dynamic>.from(discordia.map((x) => x)),
+        "Endomyces": List<dynamic>.from(endomyces.map((x) => x)),
+        "Epinephelidae": List<dynamic>.from(epinephelidae.map((x) => x)),
+        "Eupatorium": List<dynamic>.from(eupatorium.map((x) => x)),
+        "Gryphosaurus": List<dynamic>.from(gryphosaurus.map((x) => x)),
+        "Koryak": List<dynamic>.from(koryak.map((x) => x)),
+        "Lavinia": List<dynamic>.from(lavinia.map((x) => x)),
+        "Oskar": List<dynamic>.from(oskar.map((x) => x)),
+        "Rebecca": List<dynamic>.from(rebecca.map((x) => x)),
+        "Rhomboganoidei": List<dynamic>.from(rhomboganoidei.map((x) => x)),
+        "Rigsmal": rigsmal,
+        "Ruellia": List<dynamic>.from(ruellia.map((x) => x)),
+        "School": List<dynamic>.from(school.map((x) => x)),
+        "Shakespearolater": List<dynamic>.from(shakespearolater.map((x) => x)),
+        "Svan": List<dynamic>.from(svan.map((x) => x)),
+        "Wayao": Map.from(wayao).map((k, v) => MapEntry<String, dynamic>(k, v)),
+    };
+}
+
+class AlleviateClass {
+    dynamic apriori;
+    dynamic beggarer;
+    dynamic brokenheartedly;
+    dynamic debilitation;
+    dynamic frike;
+    dynamic gastrolith;
+    dynamic hulsean;
+    dynamic orthocentric;
+    dynamic petaly;
+    dynamic probudgeting;
+    dynamic reacquire;
+    dynamic scow;
+    dynamic shutoff;
+    dynamic subcontiguous;
+    dynamic suffumigate;
+    dynamic transformable;
+    dynamic uncoroneted;
+    dynamic unparking;
+    dynamic unvarnishedness;
+    dynamic wherewithal;
+
+    AlleviateClass({
+        required this.apriori,
+        required this.beggarer,
+        required this.brokenheartedly,
+        required this.debilitation,
+        required this.frike,
+        required this.gastrolith,
+        required this.hulsean,
+        required this.orthocentric,
+        required this.petaly,
+        required this.probudgeting,
+        required this.reacquire,
+        required this.scow,
+        required this.shutoff,
+        required this.subcontiguous,
+        required this.suffumigate,
+        required this.transformable,
+        required this.uncoroneted,
+        required this.unparking,
+        required this.unvarnishedness,
+        required this.wherewithal,
+    });
+
+    factory AlleviateClass.fromJson(Map<String, dynamic> json) => AlleviateClass(
+        apriori: json["apriori"],
+        beggarer: json["beggarer"],
+        brokenheartedly: json["brokenheartedly"],
+        debilitation: json["debilitation"],
+        frike: json["frike"],
+        gastrolith: json["gastrolith"],
+        hulsean: json["Hulsean"],
+        orthocentric: json["orthocentric"],
+        petaly: json["petaly"],
+        probudgeting: json["probudgeting"],
+        reacquire: json["reacquire"],
+        scow: json["scow"],
+        shutoff: json["shutoff"],
+        subcontiguous: json["subcontiguous"],
+        suffumigate: json["suffumigate"],
+        transformable: json["transformable"],
+        uncoroneted: json["uncoroneted"],
+        unparking: json["unparking"],
+        unvarnishedness: json["unvarnishedness"],
+        wherewithal: json["wherewithal"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "apriori": apriori,
+        "beggarer": beggarer,
+        "brokenheartedly": brokenheartedly,
+        "debilitation": debilitation,
+        "frike": frike,
+        "gastrolith": gastrolith,
+        "Hulsean": hulsean,
+        "orthocentric": orthocentric,
+        "petaly": petaly,
+        "probudgeting": probudgeting,
+        "reacquire": reacquire,
+        "scow": scow,
+        "shutoff": shutoff,
+        "subcontiguous": subcontiguous,
+        "suffumigate": suffumigate,
+        "transformable": transformable,
+        "uncoroneted": uncoroneted,
+        "unparking": unparking,
+        "unvarnishedness": unvarnishedness,
+        "wherewithal": wherewithal,
+    };
+}
+
+class Rebecca {
+    double catharticalness;
+    int chirotherium;
+    String disdiapason;
+    bool homocerc;
+    dynamic nonbookish;
+
+    Rebecca({
+        required this.catharticalness,
+        required this.chirotherium,
+        required this.disdiapason,
+        required this.homocerc,
+        required this.nonbookish,
+    });
+
+    factory Rebecca.fromJson(Map<String, dynamic> json) => Rebecca(
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disdiapason: json["disdiapason"],
+        homocerc: json["homocerc"],
+        nonbookish: json["nonbookish"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disdiapason": disdiapason,
+        "homocerc": homocerc,
+        "nonbookish": nonbookish,
+    };
+}
+
+class Amphithyron {
+    int? akroasis;
+    int? antiphonical;
+    int? basebred;
+    double? catharticalness;
+    int? chirotherium;
+    int? conductometric;
+    String? disdiapason;
+    int? ensilation;
+    int? eyebolt;
+    int? fistulated;
+    int? heteropod;
+    bool? homocerc;
+    int? juniperus;
+    int? labyrinthically;
+    int? martyrization;
+    int? mispolicy;
+    int? multipara;
+    int? nazirite;
+    dynamic nonbookish;
+    int? possessorial;
+    int? shamed;
+    int? shelfworn;
+    int? stagnum;
+    int? those;
+    int? undecimal;
+
+    Amphithyron({
+        this.akroasis,
+        this.antiphonical,
+        this.basebred,
+        this.catharticalness,
+        this.chirotherium,
+        this.conductometric,
+        this.disdiapason,
+        this.ensilation,
+        this.eyebolt,
+        this.fistulated,
+        this.heteropod,
+        this.homocerc,
+        this.juniperus,
+        this.labyrinthically,
+        this.martyrization,
+        this.mispolicy,
+        this.multipara,
+        this.nazirite,
+        this.nonbookish,
+        this.possessorial,
+        this.shamed,
+        this.shelfworn,
+        this.stagnum,
+        this.those,
+        this.undecimal,
+    });
+
+    factory Amphithyron.fromJson(Map<String, dynamic> json) => Amphithyron(
+        akroasis: json["akroasis"],
+        antiphonical: json["antiphonical"],
+        basebred: json["basebred"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        conductometric: json["conductometric"],
+        disdiapason: json["disdiapason"],
+        ensilation: json["ensilation"],
+        eyebolt: json["eyebolt"],
+        fistulated: json["fistulated"],
+        heteropod: json["heteropod"],
+        homocerc: json["homocerc"],
+        juniperus: json["Juniperus"],
+        labyrinthically: json["labyrinthically"],
+        martyrization: json["martyrization"],
+        mispolicy: json["mispolicy"],
+        multipara: json["multipara"],
+        nazirite: json["Nazirite"],
+        nonbookish: json["nonbookish"],
+        possessorial: json["possessorial"],
+        shamed: json["shamed"],
+        shelfworn: json["shelfworn"],
+        stagnum: json["stagnum"],
+        those: json["Those"],
+        undecimal: json["undecimal"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "akroasis": akroasis,
+        "antiphonical": antiphonical,
+        "basebred": basebred,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "conductometric": conductometric,
+        "disdiapason": disdiapason,
+        "ensilation": ensilation,
+        "eyebolt": eyebolt,
+        "fistulated": fistulated,
+        "heteropod": heteropod,
+        "homocerc": homocerc,
+        "Juniperus": juniperus,
+        "labyrinthically": labyrinthically,
+        "martyrization": martyrization,
+        "mispolicy": mispolicy,
+        "multipara": multipara,
+        "Nazirite": nazirite,
+        "nonbookish": nonbookish,
+        "possessorial": possessorial,
+        "shamed": shamed,
+        "shelfworn": shelfworn,
+        "stagnum": stagnum,
+        "Those": those,
+        "undecimal": undecimal,
+    };
+}
+
+class AnkeeClass {
+    dynamic anomoean;
+    dynamic barleyhood;
+    dynamic befriender;
+    dynamic brutishness;
+    dynamic cephalalgy;
+    dynamic cirurgian;
+    dynamic conventionally;
+    dynamic jackshay;
+    dynamic milammeter;
+    dynamic naja;
+    dynamic ombrological;
+    dynamic phonasthenia;
+    dynamic retrievableness;
+    dynamic snakily;
+    dynamic swot;
+    dynamic tartlet;
+    dynamic thiofuran;
+    dynamic tracheophone;
+    dynamic tuglike;
+    dynamic unscratchingly;
+
+    AnkeeClass({
+        required this.anomoean,
+        required this.barleyhood,
+        required this.befriender,
+        required this.brutishness,
+        required this.cephalalgy,
+        required this.cirurgian,
+        required this.conventionally,
+        required this.jackshay,
+        required this.milammeter,
+        required this.naja,
+        required this.ombrological,
+        required this.phonasthenia,
+        required this.retrievableness,
+        required this.snakily,
+        required this.swot,
+        required this.tartlet,
+        required this.thiofuran,
+        required this.tracheophone,
+        required this.tuglike,
+        required this.unscratchingly,
+    });
+
+    factory AnkeeClass.fromJson(Map<String, dynamic> json) => AnkeeClass(
+        anomoean: json["Anomoean"],
+        barleyhood: json["barleyhood"],
+        befriender: json["befriender"],
+        brutishness: json["brutishness"],
+        cephalalgy: json["cephalalgy"],
+        cirurgian: json["cirurgian"],
+        conventionally: json["conventionally"],
+        jackshay: json["jackshay"],
+        milammeter: json["milammeter"],
+        naja: json["Naja"],
+        ombrological: json["ombrological"],
+        phonasthenia: json["phonasthenia"],
+        retrievableness: json["retrievableness"],
+        snakily: json["snakily"],
+        swot: json["swot"],
+        tartlet: json["tartlet"],
+        thiofuran: json["thiofuran"],
+        tracheophone: json["tracheophone"],
+        tuglike: json["tuglike"],
+        unscratchingly: json["unscratchingly"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Anomoean": anomoean,
+        "barleyhood": barleyhood,
+        "befriender": befriender,
+        "brutishness": brutishness,
+        "cephalalgy": cephalalgy,
+        "cirurgian": cirurgian,
+        "conventionally": conventionally,
+        "jackshay": jackshay,
+        "milammeter": milammeter,
+        "Naja": naja,
+        "ombrological": ombrological,
+        "phonasthenia": phonasthenia,
+        "retrievableness": retrievableness,
+        "snakily": snakily,
+        "swot": swot,
+        "tartlet": tartlet,
+        "thiofuran": thiofuran,
+        "tracheophone": tracheophone,
+        "tuglike": tuglike,
+        "unscratchingly": unscratchingly,
+    };
+}
+
+class AnsarieClass {
+    dynamic accension;
+    dynamic alida;
+    dynamic asteria;
+    dynamic beriberic;
+    dynamic edgebone;
+    dynamic gastrodialysis;
+    dynamic geographic;
+    dynamic ictonyx;
+    dynamic metrocele;
+    dynamic misgraft;
+    dynamic monteith;
+    dynamic notcher;
+    dynamic prorestriction;
+    dynamic ramist;
+    dynamic throatlet;
+    dynamic unfair;
+    dynamic unsynonymous;
+    dynamic water;
+    dynamic zestfully;
+    dynamic zincic;
+
+    AnsarieClass({
+        required this.accension,
+        required this.alida,
+        required this.asteria,
+        required this.beriberic,
+        required this.edgebone,
+        required this.gastrodialysis,
+        required this.geographic,
+        required this.ictonyx,
+        required this.metrocele,
+        required this.misgraft,
+        required this.monteith,
+        required this.notcher,
+        required this.prorestriction,
+        required this.ramist,
+        required this.throatlet,
+        required this.unfair,
+        required this.unsynonymous,
+        required this.water,
+        required this.zestfully,
+        required this.zincic,
+    });
+
+    factory AnsarieClass.fromJson(Map<String, dynamic> json) => AnsarieClass(
+        accension: json["accension"],
+        alida: json["Alida"],
+        asteria: json["asteria"],
+        beriberic: json["beriberic"],
+        edgebone: json["edgebone"],
+        gastrodialysis: json["gastrodialysis"],
+        geographic: json["geographic"],
+        ictonyx: json["Ictonyx"],
+        metrocele: json["metrocele"],
+        misgraft: json["misgraft"],
+        monteith: json["monteith"],
+        notcher: json["notcher"],
+        prorestriction: json["prorestriction"],
+        ramist: json["Ramist"],
+        throatlet: json["throatlet"],
+        unfair: json["unfair"],
+        unsynonymous: json["unsynonymous"],
+        water: json["water"],
+        zestfully: json["zestfully"],
+        zincic: json["zincic"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "accension": accension,
+        "Alida": alida,
+        "asteria": asteria,
+        "beriberic": beriberic,
+        "edgebone": edgebone,
+        "gastrodialysis": gastrodialysis,
+        "geographic": geographic,
+        "Ictonyx": ictonyx,
+        "metrocele": metrocele,
+        "misgraft": misgraft,
+        "monteith": monteith,
+        "notcher": notcher,
+        "prorestriction": prorestriction,
+        "Ramist": ramist,
+        "throatlet": throatlet,
+        "unfair": unfair,
+        "unsynonymous": unsynonymous,
+        "water": water,
+        "zestfully": zestfully,
+        "zincic": zincic,
+    };
+}
+
+class ChytridiaceaeClass {
+    dynamic batidaceae;
+    dynamic brechites;
+    dynamic codespairer;
+    dynamic emery;
+    dynamic enervative;
+    dynamic excriminate;
+    dynamic goshenite;
+    dynamic grime;
+    dynamic gritten;
+    dynamic hectorly;
+    dynamic intermediation;
+    dynamic meeterly;
+    dynamic narraganset;
+    dynamic onymatic;
+    dynamic paddlecock;
+    dynamic thana;
+    dynamic thornily;
+    dynamic uckia;
+    dynamic unmettle;
+    dynamic vorticellid;
+
+    ChytridiaceaeClass({
+        required this.batidaceae,
+        required this.brechites,
+        required this.codespairer,
+        required this.emery,
+        required this.enervative,
+        required this.excriminate,
+        required this.goshenite,
+        required this.grime,
+        required this.gritten,
+        required this.hectorly,
+        required this.intermediation,
+        required this.meeterly,
+        required this.narraganset,
+        required this.onymatic,
+        required this.paddlecock,
+        required this.thana,
+        required this.thornily,
+        required this.uckia,
+        required this.unmettle,
+        required this.vorticellid,
+    });
+
+    factory ChytridiaceaeClass.fromJson(Map<String, dynamic> json) => ChytridiaceaeClass(
+        batidaceae: json["Batidaceae"],
+        brechites: json["Brechites"],
+        codespairer: json["codespairer"],
+        emery: json["Emery"],
+        enervative: json["enervative"],
+        excriminate: json["excriminate"],
+        goshenite: json["goshenite"],
+        grime: json["grime"],
+        gritten: json["gritten"],
+        hectorly: json["hectorly"],
+        intermediation: json["intermediation"],
+        meeterly: json["meeterly"],
+        narraganset: json["Narraganset"],
+        onymatic: json["onymatic"],
+        paddlecock: json["paddlecock"],
+        thana: json["thana"],
+        thornily: json["thornily"],
+        uckia: json["uckia"],
+        unmettle: json["unmettle"],
+        vorticellid: json["vorticellid"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Batidaceae": batidaceae,
+        "Brechites": brechites,
+        "codespairer": codespairer,
+        "Emery": emery,
+        "enervative": enervative,
+        "excriminate": excriminate,
+        "goshenite": goshenite,
+        "grime": grime,
+        "gritten": gritten,
+        "hectorly": hectorly,
+        "intermediation": intermediation,
+        "meeterly": meeterly,
+        "Narraganset": narraganset,
+        "onymatic": onymatic,
+        "paddlecock": paddlecock,
+        "thana": thana,
+        "thornily": thornily,
+        "uckia": uckia,
+        "unmettle": unmettle,
+        "vorticellid": vorticellid,
+    };
+}
+
+class DiscordiaClass {
+    int? altaic;
+    int? amoristic;
+    int? blennophthalmia;
+    double? catharticalness;
+    int? chirotherium;
+    int? disciplinability;
+    String? disdiapason;
+    int? goofer;
+    bool? homocerc;
+    int? laryngograph;
+    int? leucitis;
+    int? lymphocyst;
+    int? microcosmology;
+    int? nauseation;
+    dynamic nonbookish;
+    int? patarin;
+    int? preliberal;
+    int? prettifier;
+    int? rangework;
+    int? redient;
+    int? subfusiform;
+    int? suicidical;
+    int? swow;
+    int? wastrel;
+    int? wingle;
+
+    DiscordiaClass({
+        this.altaic,
+        this.amoristic,
+        this.blennophthalmia,
+        this.catharticalness,
+        this.chirotherium,
+        this.disciplinability,
+        this.disdiapason,
+        this.goofer,
+        this.homocerc,
+        this.laryngograph,
+        this.leucitis,
+        this.lymphocyst,
+        this.microcosmology,
+        this.nauseation,
+        this.nonbookish,
+        this.patarin,
+        this.preliberal,
+        this.prettifier,
+        this.rangework,
+        this.redient,
+        this.subfusiform,
+        this.suicidical,
+        this.swow,
+        this.wastrel,
+        this.wingle,
+    });
+
+    factory DiscordiaClass.fromJson(Map<String, dynamic> json) => DiscordiaClass(
+        altaic: json["Altaic"],
+        amoristic: json["amoristic"],
+        blennophthalmia: json["blennophthalmia"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        disciplinability: json["disciplinability"],
+        disdiapason: json["disdiapason"],
+        goofer: json["goofer"],
+        homocerc: json["homocerc"],
+        laryngograph: json["laryngograph"],
+        leucitis: json["leucitis"],
+        lymphocyst: json["lymphocyst"],
+        microcosmology: json["microcosmology"],
+        nauseation: json["nauseation"],
+        nonbookish: json["nonbookish"],
+        patarin: json["Patarin"],
+        preliberal: json["preliberal"],
+        prettifier: json["prettifier"],
+        rangework: json["rangework"],
+        redient: json["redient"],
+        subfusiform: json["subfusiform"],
+        suicidical: json["suicidical"],
+        swow: json["swow"],
+        wastrel: json["wastrel"],
+        wingle: json["wingle"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Altaic": altaic,
+        "amoristic": amoristic,
+        "blennophthalmia": blennophthalmia,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "disciplinability": disciplinability,
+        "disdiapason": disdiapason,
+        "goofer": goofer,
+        "homocerc": homocerc,
+        "laryngograph": laryngograph,
+        "leucitis": leucitis,
+        "lymphocyst": lymphocyst,
+        "microcosmology": microcosmology,
+        "nauseation": nauseation,
+        "nonbookish": nonbookish,
+        "Patarin": patarin,
+        "preliberal": preliberal,
+        "prettifier": prettifier,
+        "rangework": rangework,
+        "redient": redient,
+        "subfusiform": subfusiform,
+        "suicidical": suicidical,
+        "swow": swow,
+        "wastrel": wastrel,
+        "wingle": wingle,
+    };
+}
+
+class GryphosaurusClass {
+    dynamic amissibility;
+    dynamic burushaski;
+    dynamic citronin;
+    dynamic coplaintiff;
+    dynamic disquisitionary;
+    dynamic enoplan;
+    dynamic faintness;
+    dynamic hebetomy;
+    dynamic islandry;
+    dynamic lameduck;
+    dynamic overbattle;
+    dynamic overinterested;
+    dynamic phrenologic;
+    dynamic rainband;
+    dynamic shiningly;
+    dynamic stamineous;
+    dynamic subscapularis;
+    dynamic tahami;
+    dynamic undaubed;
+    dynamic underntime;
+
+    GryphosaurusClass({
+        required this.amissibility,
+        required this.burushaski,
+        required this.citronin,
+        required this.coplaintiff,
+        required this.disquisitionary,
+        required this.enoplan,
+        required this.faintness,
+        required this.hebetomy,
+        required this.islandry,
+        required this.lameduck,
+        required this.overbattle,
+        required this.overinterested,
+        required this.phrenologic,
+        required this.rainband,
+        required this.shiningly,
+        required this.stamineous,
+        required this.subscapularis,
+        required this.tahami,
+        required this.undaubed,
+        required this.underntime,
+    });
+
+    factory GryphosaurusClass.fromJson(Map<String, dynamic> json) => GryphosaurusClass(
+        amissibility: json["amissibility"],
+        burushaski: json["Burushaski"],
+        citronin: json["citronin"],
+        coplaintiff: json["coplaintiff"],
+        disquisitionary: json["disquisitionary"],
+        enoplan: json["enoplan"],
+        faintness: json["faintness"],
+        hebetomy: json["hebetomy"],
+        islandry: json["islandry"],
+        lameduck: json["lameduck"],
+        overbattle: json["overbattle"],
+        overinterested: json["overinterested"],
+        phrenologic: json["phrenologic"],
+        rainband: json["rainband"],
+        shiningly: json["shiningly"],
+        stamineous: json["stamineous"],
+        subscapularis: json["subscapularis"],
+        tahami: json["Tahami"],
+        undaubed: json["undaubed"],
+        underntime: json["underntime"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "amissibility": amissibility,
+        "Burushaski": burushaski,
+        "citronin": citronin,
+        "coplaintiff": coplaintiff,
+        "disquisitionary": disquisitionary,
+        "enoplan": enoplan,
+        "faintness": faintness,
+        "hebetomy": hebetomy,
+        "islandry": islandry,
+        "lameduck": lameduck,
+        "overbattle": overbattle,
+        "overinterested": overinterested,
+        "phrenologic": phrenologic,
+        "rainband": rainband,
+        "shiningly": shiningly,
+        "stamineous": stamineous,
+        "subscapularis": subscapularis,
+        "Tahami": tahami,
+        "undaubed": undaubed,
+        "underntime": underntime,
+    };
+}
+
+class LaviniaClass {
+    int? agitable;
+    int? asininity;
+    int? benefiter;
+    int? bronzelike;
+    double? catharticalness;
+    int? chirotherium;
+    int? cholesteatomatous;
+    int? deprivement;
+    String? disdiapason;
+    int? flippantness;
+    int? fogproof;
+    bool? homocerc;
+    int? merrymeeting;
+    dynamic nonbookish;
+    int? overcareful;
+    int? panaris;
+    int? preacceptance;
+    int? quinoxaline;
+    int? sig;
+    int? superconfusion;
+    int? tacana;
+    int? tillotter;
+    int? tranquillize;
+    int? unquestionable;
+    int? uproute;
+
+    LaviniaClass({
+        this.agitable,
+        this.asininity,
+        this.benefiter,
+        this.bronzelike,
+        this.catharticalness,
+        this.chirotherium,
+        this.cholesteatomatous,
+        this.deprivement,
+        this.disdiapason,
+        this.flippantness,
+        this.fogproof,
+        this.homocerc,
+        this.merrymeeting,
+        this.nonbookish,
+        this.overcareful,
+        this.panaris,
+        this.preacceptance,
+        this.quinoxaline,
+        this.sig,
+        this.superconfusion,
+        this.tacana,
+        this.tillotter,
+        this.tranquillize,
+        this.unquestionable,
+        this.uproute,
+    });
+
+    factory LaviniaClass.fromJson(Map<String, dynamic> json) => LaviniaClass(
+        agitable: json["agitable"],
+        asininity: json["asininity"],
+        benefiter: json["benefiter"],
+        bronzelike: json["bronzelike"],
+        catharticalness: json["catharticalness"]?.toDouble(),
+        chirotherium: json["Chirotherium"],
+        cholesteatomatous: json["cholesteatomatous"],
+        deprivement: json["deprivement"],
+        disdiapason: json["disdiapason"],
+        flippantness: json["flippantness"],
+        fogproof: json["fogproof"],
+        homocerc: json["homocerc"],
+        merrymeeting: json["merrymeeting"],
+        nonbookish: json["nonbookish"],
+        overcareful: json["overcareful"],
+        panaris: json["panaris"],
+        preacceptance: json["preacceptance"],
+        quinoxaline: json["quinoxaline"],
+        sig: json["sig"],
+        superconfusion: json["superconfusion"],
+        tacana: json["Tacana"],
+        tillotter: json["tillotter"],
+        tranquillize: json["tranquillize"],
+        unquestionable: json["unquestionable"],
+        uproute: json["uproute"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "agitable": agitable,
+        "asininity": asininity,
+        "benefiter": benefiter,
+        "bronzelike": bronzelike,
+        "catharticalness": catharticalness,
+        "Chirotherium": chirotherium,
+        "cholesteatomatous": cholesteatomatous,
+        "deprivement": deprivement,
+        "disdiapason": disdiapason,
+        "flippantness": flippantness,
+        "fogproof": fogproof,
+        "homocerc": homocerc,
+        "merrymeeting": merrymeeting,
+        "nonbookish": nonbookish,
+        "overcareful": overcareful,
+        "panaris": panaris,
+        "preacceptance": preacceptance,
+        "quinoxaline": quinoxaline,
+        "sig": sig,
+        "superconfusion": superconfusion,
+        "Tacana": tacana,
+        "tillotter": tillotter,
+        "tranquillize": tranquillize,
+        "unquestionable": unquestionable,
+        "uproute": uproute,
+    };
+}
+
+class OskarClass {
+    dynamic acrobates;
+    dynamic beanshooter;
+    dynamic bearhound;
+    dynamic cayuga;
+    dynamic guarneri;
+    dynamic hypochondriacism;
+    dynamic indication;
+    dynamic jaculative;
+    dynamic nagana;
+    dynamic netherlandish;
+    dynamic noctivagous;
+    dynamic nonphysiological;
+    dynamic praxis;
+    dynamic provision;
+    dynamic subterhuman;
+    dynamic sunlit;
+    dynamic syncraniate;
+    dynamic teachment;
+    dynamic unmutinous;
+    dynamic unstoppable;
+
+    OskarClass({
+        required this.acrobates,
+        required this.beanshooter,
+        required this.bearhound,
+        required this.cayuga,
+        required this.guarneri,
+        required this.hypochondriacism,
+        required this.indication,
+        required this.jaculative,
+        required this.nagana,
+        required this.netherlandish,
+        required this.noctivagous,
+        required this.nonphysiological,
+        required this.praxis,
+        required this.provision,
+        required this.subterhuman,
+        required this.sunlit,
+        required this.syncraniate,
+        required this.teachment,
+        required this.unmutinous,
+        required this.unstoppable,
+    });
+
+    factory OskarClass.fromJson(Map<String, dynamic> json) => OskarClass(
+        acrobates: json["Acrobates"],
+        beanshooter: json["beanshooter"],
+        bearhound: json["bearhound"],
+        cayuga: json["Cayuga"],
+        guarneri: json["guarneri"],
+        hypochondriacism: json["hypochondriacism"],
+        indication: json["indication"],
+        jaculative: json["jaculative"],
+        nagana: json["nagana"],
+        netherlandish: json["Netherlandish"],
+        noctivagous: json["noctivagous"],
+        nonphysiological: json["nonphysiological"],
+        praxis: json["praxis"],
+        provision: json["provision"],
+        subterhuman: json["subterhuman"],
+        sunlit: json["sunlit"],
+        syncraniate: json["syncraniate"],
+        teachment: json["teachment"],
+        unmutinous: json["unmutinous"],
+        unstoppable: json["unstoppable"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "Acrobates": acrobates,
+        "beanshooter": beanshooter,
+        "bearhound": bearhound,
+        "Cayuga": cayuga,
+        "guarneri": guarneri,
+        "hypochondriacism": hypochondriacism,
+        "indication": indication,
+        "jaculative": jaculative,
+        "nagana": nagana,
+        "Netherlandish": netherlandish,
+        "noctivagous": noctivagous,
+        "nonphysiological": nonphysiological,
+        "praxis": praxis,
+        "provision": provision,
+        "subterhuman": subterhuman,
+        "sunlit": sunlit,
+        "syncraniate": syncraniate,
+        "teachment": teachment,
+        "unmutinous": unmutinous,
+        "unstoppable": unstoppable,
+    };
+}
diff --git a/base/schema-dart/test/inputs/schema/class-map-union.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/class-map-union.schema/default/TopLevel.dart
index 4d26de0..11220d9 100644
--- a/base/schema-dart/test/inputs/schema/class-map-union.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/class-map-union.schema/default/TopLevel.dart
@@ -16,11 +16,11 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        union: Map.from(json["union"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        union: json["union"] == null ? null : Map.from(json["union"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
     );
 
     Map<String, dynamic> toJson() => {
-        "union": Map.from(union!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "union": union == null ? null : Map.from(union!).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/class-with-additional.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/class-with-additional.schema/default/TopLevel.dart
index 4f40c88..fb27cdb 100644
--- a/base/schema-dart/test/inputs/schema/class-with-additional.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/class-with-additional.schema/default/TopLevel.dart
@@ -16,10 +16,10 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        map: Map.from(json["map"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        map: json["map"] == null ? null : Map.from(json["map"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
     );
 
     Map<String, dynamic> toJson() => {
-        "map": Map.from(map!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "map": map == null ? null : Map.from(map!).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
diff --git a/base/schema-dart/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.dart
index 7abcf39..33e2c1a 100644
--- a/base/schema-dart/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.dart
@@ -38,13 +38,13 @@ class Config {
     factory Config.fromJson(Map<String, dynamic> json) => Config(
         closed: json["closed"],
         name: json["name"],
-        settings: Map.from(json["settings"]!).map((k, v) => MapEntry<String, List<Item>>(k, List<Item>.from(v.map((x) => Item.fromJson(x))))),
+        settings: json["settings"] == null ? null : Map.from(json["settings"]!).map((k, v) => MapEntry<String, List<Item>>(k, List<Item>.from(v.map((x) => Item.fromJson(x))))),
     );
 
     Map<String, dynamic> toJson() => {
         "closed": closed,
         "name": name,
-        "settings": Map.from(settings!).map((k, v) => MapEntry<String, dynamic>(k, List<dynamic>.from(v.map((x) => x.toJson())))),
+        "settings": settings == null ? null : Map.from(settings!).map((k, v) => MapEntry<String, dynamic>(k, List<dynamic>.from(v.map((x) => x.toJson())))),
     };
 }
 
diff --git a/base/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
index e65602f..2a15c49 100644
--- a/base/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
@@ -189,7 +189,7 @@ class TopLevel {
         name: json["name"],
         padding: json["padding"],
         projection: json["projection"] == null ? null : Projection.fromJson(json["projection"]),
-        selection: Map.from(json["selection"]!).map((k, v) => MapEntry<String, SelectionDef>(k, SelectionDef.fromJson(v))),
+        selection: json["selection"] == null ? null : Map.from(json["selection"]!).map((k, v) => MapEntry<String, SelectionDef>(k, SelectionDef.fromJson(v))),
         title: json["title"],
         transform: json["transform"] == null ? null : List<Transform>.from(json["transform"]!.map((x) => Transform.fromJson(x))),
         width: json["width"]?.toDouble(),
@@ -215,7 +215,7 @@ class TopLevel {
         "name": name,
         "padding": padding,
         "projection": projection?.toJson(),
-        "selection": Map.from(selection!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "selection": selection == null ? null : Map.from(selection!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
         "title": title,
         "transform": transform == null ? null : List<dynamic>.from(transform!.map((x) => x.toJson())),
         "width": width,
@@ -534,14 +534,14 @@ class Config {
         padding: json["padding"],
         point: json["point"] == null ? null : MarkConfig.fromJson(json["point"]),
         projection: json["projection"] == null ? null : ProjectionConfig.fromJson(json["projection"]),
-        range: Map.from(json["range"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        range: json["range"] == null ? null : Map.from(json["range"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
         rect: json["rect"] == null ? null : MarkConfig.fromJson(json["rect"]),
         rule: json["rule"] == null ? null : MarkConfig.fromJson(json["rule"]),
         scale: json["scale"] == null ? null : ScaleConfig.fromJson(json["scale"]),
         selection: json["selection"] == null ? null : SelectionConfig.fromJson(json["selection"]),
         square: json["square"] == null ? null : MarkConfig.fromJson(json["square"]),
         stack: stackOffsetValues.map[json["stack"]],
-        style: Map.from(json["style"]!).map((k, v) => MapEntry<String, VgMarkConfig>(k, VgMarkConfig.fromJson(v))),
+        style: json["style"] == null ? null : Map.from(json["style"]!).map((k, v) => MapEntry<String, VgMarkConfig>(k, VgMarkConfig.fromJson(v))),
         text: json["text"] == null ? null : TextConfig.fromJson(json["text"]),
         tick: json["tick"] == null ? null : TickConfig.fromJson(json["tick"]),
         timeFormat: json["timeFormat"],
@@ -574,14 +574,14 @@ class Config {
         "padding": padding,
         "point": point?.toJson(),
         "projection": projection?.toJson(),
-        "range": Map.from(range!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "range": range == null ? null : Map.from(range!).map((k, v) => MapEntry<String, dynamic>(k, v)),
         "rect": rect?.toJson(),
         "rule": rule?.toJson(),
         "scale": scale?.toJson(),
         "selection": selection?.toJson(),
         "square": square?.toJson(),
         "stack": stackOffsetValues.reverse[stack],
-        "style": Map.from(style!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "style": style == null ? null : Map.from(style!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
         "text": text?.toJson(),
         "tick": tick?.toJson(),
         "timeFormat": timeFormat,
@@ -2376,7 +2376,7 @@ class ProjectionConfig {
         fraction: json["fraction"]?.toDouble(),
         lobes: json["lobes"]?.toDouble(),
         parallel: json["parallel"]?.toDouble(),
-        precision: Map.from(json["precision"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        precision: json["precision"] == null ? null : Map.from(json["precision"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
         radius: json["radius"]?.toDouble(),
         ratio: json["ratio"]?.toDouble(),
         rotate: json["rotate"] == null ? null : List<double>.from(json["rotate"]!.map((x) => x?.toDouble())),
@@ -2394,7 +2394,7 @@ class ProjectionConfig {
         "fraction": fraction,
         "lobes": lobes,
         "parallel": parallel,
-        "precision": Map.from(precision!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "precision": precision == null ? null : Map.from(precision!).map((k, v) => MapEntry<String, dynamic>(k, v)),
         "radius": radius,
         "ratio": ratio,
         "rotate": rotate == null ? null : List<dynamic>.from(rotate!.map((x) => x)),
@@ -3067,7 +3067,7 @@ class SingleSelectionConfig {
     });
 
     factory SingleSelectionConfig.fromJson(Map<String, dynamic> json) => SingleSelectionConfig(
-        bind: Map.from(json["bind"]!).map((k, v) => MapEntry<String, VgBinding>(k, VgBinding.fromJson(v))),
+        bind: json["bind"] == null ? null : Map.from(json["bind"]!).map((k, v) => MapEntry<String, VgBinding>(k, VgBinding.fromJson(v))),
         empty: emptyValues.map[json["empty"]],
         encodings: json["encodings"] == null ? null : List<SingleDefChannel>.from(json["encodings"]!.map((x) => singleDefChannelValues.map[x]!)),
         fields: json["fields"] == null ? null : List<String>.from(json["fields"]!.map((x) => x)),
@@ -3077,7 +3077,7 @@ class SingleSelectionConfig {
     );
 
     Map<String, dynamic> toJson() => {
-        "bind": Map.from(bind!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "bind": bind == null ? null : Map.from(bind!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
         "empty": emptyValues.reverse[empty],
         "encodings": encodings == null ? null : List<dynamic>.from(encodings!.map((x) => singleDefChannelValues.reverse[x])),
         "fields": fields == null ? null : List<dynamic>.from(fields!.map((x) => x)),
@@ -7050,7 +7050,7 @@ class Spec {
         encoding: json["encoding"] == null ? null : Encoding.fromJson(json["encoding"]),
         mark: json["mark"],
         projection: json["projection"] == null ? null : Projection.fromJson(json["projection"]),
-        selection: Map.from(json["selection"]!).map((k, v) => MapEntry<String, SelectionDef>(k, SelectionDef.fromJson(v))),
+        selection: json["selection"] == null ? null : Map.from(json["selection"]!).map((k, v) => MapEntry<String, SelectionDef>(k, SelectionDef.fromJson(v))),
         facet: json["facet"] == null ? null : FacetMapping.fromJson(json["facet"]),
         spec: json["spec"] == null ? null : Spec.fromJson(json["spec"]),
         repeat: json["repeat"] == null ? null : Repeat.fromJson(json["repeat"]),
@@ -7071,7 +7071,7 @@ class Spec {
         "encoding": encoding?.toJson(),
         "mark": mark,
         "projection": projection?.toJson(),
-        "selection": Map.from(selection!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "selection": selection == null ? null : Map.from(selection!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
         "facet": facet?.toJson(),
         "spec": spec?.toJson(),
         "repeat": repeat?.toJson(),
@@ -7314,7 +7314,7 @@ class LayerSpec {
         encoding: json["encoding"] == null ? null : Encoding.fromJson(json["encoding"]),
         mark: json["mark"],
         projection: json["projection"] == null ? null : Projection.fromJson(json["projection"]),
-        selection: Map.from(json["selection"]!).map((k, v) => MapEntry<String, SelectionDef>(k, SelectionDef.fromJson(v))),
+        selection: json["selection"] == null ? null : Map.from(json["selection"]!).map((k, v) => MapEntry<String, SelectionDef>(k, SelectionDef.fromJson(v))),
     );
 
     Map<String, dynamic> toJson() => {
@@ -7330,7 +7330,7 @@ class LayerSpec {
         "encoding": encoding?.toJson(),
         "mark": mark,
         "projection": projection?.toJson(),
-        "selection": Map.from(selection!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
+        "selection": selection == null ? null : Map.from(selection!).map((k, v) => MapEntry<String, dynamic>(k, v.toJson())),
     };
 }
 
@@ -7737,7 +7737,7 @@ class Projection {
         fraction: json["fraction"]?.toDouble(),
         lobes: json["lobes"]?.toDouble(),
         parallel: json["parallel"]?.toDouble(),
-        precision: Map.from(json["precision"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        precision: json["precision"] == null ? null : Map.from(json["precision"]!).map((k, v) => MapEntry<String, dynamic>(k, v)),
         radius: json["radius"]?.toDouble(),
         ratio: json["ratio"]?.toDouble(),
         rotate: json["rotate"] == null ? null : List<double>.from(json["rotate"]!.map((x) => x?.toDouble())),
@@ -7755,7 +7755,7 @@ class Projection {
         "fraction": fraction,
         "lobes": lobes,
         "parallel": parallel,
-        "precision": Map.from(precision!).map((k, v) => MapEntry<String, dynamic>(k, v)),
+        "precision": precision == null ? null : Map.from(precision!).map((k, v) => MapEntry<String, dynamic>(k, v)),
         "radius": radius,
         "ratio": ratio,
         "rotate": rotate == null ? null : List<dynamic>.from(rotate!.map((x) => x)),
