title: Unknown type on deserialization. Need either specifiedType or discriminator field
body: <p>I have following json </p>
  
  <pre><code>{
      "status": 1,
      "msg": "Success",
      "data": {
          "getFeeCount": [
              {
                  "yearId": "1",
                  "yearName": "FY 2017-18"
              },
              {
                  "yearId": "2",
                  "yearName": "FY 2018-19"
              }
          ],
          "getFeeCat": [
              {
                  "fee_cat_id": "1",
                  "fee_cat_name": "1st Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "2",
                  "fee_cat_name": "2nd Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "3",
                  "fee_cat_name": "3rd Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "4",
                  "fee_cat_name": "4th Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "5",
                  "fee_cat_name": "5th Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "6",
                  "fee_cat_name": "6th Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "7",
                  "fee_cat_name": "7th Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "8",
                  "fee_cat_name": "8th Semester Tuition Fee"
              },
              {
                  "fee_cat_id": "9",
                  "fee_cat_name": "Certification Fee Year 1"
              },
              {
                  "fee_cat_id": "10",
                  "fee_cat_name": "Certification Fee Year 2"
              },
              {
                  "fee_cat_id": "11",
                  "fee_cat_name": "Certification Fee Year 3"
              },
              {
                  "fee_cat_id": "12",
                  "fee_cat_name": "Certification Fee Year 4"
              }
          ]
      }
  }
  </code></pre>
  
  <p>I am using built value in my project</p>
  
  <pre><code>library dashboard_fiscal_year_model;
  
  import 'package:built_collection/built_collection.dart';
  import 'package:built_value/built_value.dart';
  import 'package:built_value/serializer.dart';
  
  part 'dashboard_fiscal_year_model.g.dart';
  
  abstract class DashboardFiscalYearModel
      implements
          Built&lt;DashboardFiscalYearModel, DashboardFiscalYearModelBuilder&gt; {
    DashboardFiscalYearModel._();
  
    factory DashboardFiscalYearModel(
            [updates(DashboardFiscalYearModelBuilder b)]) =
        _$DashboardFiscalYearModel;
  
    @BuiltValueField(wireName: 'status')
    int get status;
    @BuiltValueField(wireName: 'msg')
    String get msg;
    @BuiltValueField(wireName: 'data')
    DashboardFiscalYearData get data;
  
    static Serializer&lt;DashboardFiscalYearModel&gt; get serializer =&gt;
        _$dashboardFiscalYearModelSerializer;
  }
  
  abstract class DashboardFiscalYearData
      implements Built&lt;DashboardFiscalYearData, DashboardFiscalYearDataBuilder&gt; {
    DashboardFiscalYearData._();
  
    factory DashboardFiscalYearData([updates(DashboardFiscalYearDataBuilder b)]) =
        _$DashboardFiscalYearData;
  
    @BuiltValueField(wireName: 'getFeeCount')
    BuiltList&lt;GetFeeCount&gt; get getFeeCount;
    @BuiltValueField(wireName: 'getFeeCat')
    BuiltList&lt;GetFeeCat&gt; get getFeeCat;
  
    static Serializer&lt;DashboardFiscalYearData&gt; get serializer =&gt;
        _$dashboardFiscalYearDataSerializer;
  }
  
  abstract class GetFeeCount implements Built&lt;GetFeeCount, GetFeeCountBuilder&gt; {
    GetFeeCount._();
  
    factory GetFeeCount([updates(GetFeeCountBuilder b)]) = _$GetFeeCount;
  
    @nullable
    @BuiltValueField(wireName: 'yearId')
    String get yearId;
    @nullable
    @BuiltValueField(wireName: 'yearName')
    String get yearName;
  
    static Serializer&lt;GetFeeCount&gt; get serializer =&gt; _$getFeeCountSerializer;
  }
  
  abstract class GetFeeCat implements Built&lt;GetFeeCat, GetFeeCatBuilder&gt; {
    GetFeeCat._();
  
    factory GetFeeCat([updates(GetFeeCatBuilder b)]) = _$GetFeeCat;
  
    @nullable
    @BuiltValueField(wireName: 'fee_cat_id')
    String get feeCatId;
    @nullable
    @BuiltValueField(wireName: 'fee_cat_name')
    String get feeCatName;
  }
  </code></pre>
  
  <p>but whenever I run my app I get the following error</p>
  
  <pre><code>[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: Deserializing '[status, 1, msg, Success, data, {getFeeCount: [{yearId: 1, yearName: FY 2017-...' to 'DashboardFiscalYearModel' failed due to: Deserializing '[getFeeCount, [{yearId: 1, yearName: FY 2017-18}, {yearId: 2, yearName: FY 20...' to 'DashboardFiscalYearData' failed due to: Deserializing '[{fee_cat_id: 1, fee_cat_name: 1st Semester Tuition Fee}, {fee_cat_id: 2, fee...' to 'BuiltList&lt;GetFeeCat&gt;' failed due to: Invalid argument(s): Unknown type on deserialization. Need either specifiedType or discriminator field.
  #0      BuiltJsonSerializers._deserialize (package:built_value/src/built_json_serializers.dart:154:11)
  #1      BuiltJsonSerializers.deserialize (package:built_value/src/built_json_serializers.dart:105:18)
  #2      BuiltJsonSerializers.deserializeWith (package:built_value/src/built_json_serializers.dart:35:12)
  #3      DashboardDropDownApiProvider.getFiscalYear (package:dice_admin/resources/dashboard/dashboard_fiscal_year/dashboard_fi&lt;…&gt;
  [VERBOSE-2:shell.cc(178)] Dart Error: Unhandled exception:
  'dart:isolate/runtime/libtimer_impl.dart': Failed assertion: line 433: '&lt;optimized out&gt;': is not true.
  #0      _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:40:39)
  #1      _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:36:5)
  #2      _Timer._cancelWakeup (dart:isolate/runtime/libtimer_impl.dart:433:12)
  #3      _Timer._notifyEventHandler (dart:isolate/runtime/libtimer_impl.dart:299:7)
  #4      _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:419:5)
  #5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
  </code></pre>
  
  <p>I have regenerated the code many times and the serialiser is also mapped properly I think.</p>
  
  <p>I went through this post <a href="https://github.com/google/built_value.dart/issues/368" rel="nofollow noreferrer">https://github.com/google/built_value.dart/issues/368</a>
  It uses a custom plugin, has built value resolved this issue or do I need to use the custom built value</p>