beforeDeserialize method

  1. @override
Object? beforeDeserialize(
  1. Object? object,
  2. FullType specifiedType
)
override

Implementation

@override
Object? beforeDeserialize(Object? object, FullType specifiedType) {
  if (object is Map && specifiedType.root != JsonObject) {
    if (specifiedType.isUnspecified) {
      return _toListUsingDiscriminator(object);
    } else {
      return _toList(object, _needsEncodedKeys(specifiedType),
          keepNulls: specifiedType.root == BuiltMap);
    }
  } else {
    return object;
  }
}