anchor.diff:    Object beforeDeserialize(Object object, FullType specifiedType) {
       if (object is Map && specifiedType.root != JsonObject) {
         if (specifiedType.isUnspecified) {
  -        return _toListExtractType(object);
  +        return _toListUsingDiscriminator(object);
         } else {
  -        return _toList(object, _alreadyHasStringKeys(specifiedType));
  +        return _toList(object, _needsEncodedKeys(specifiedType));
         }
       } else {
         return object;
  
positive.code:       // Drop null values, they are represented by missing keys.
        if (value == null) return;
  
        result[i] = needToDecodeKeys ? _fromStringKey(key as String) : key;
        result[i + 1] = value;
        i += 2;
      });
      return result;
    }
  
    Object _fromStringKey(String key) {
      return JSON.decode(key);
    }
  }
  
negative.code:     final result = <Object, Object>{discriminator: type};
      for (int i = 0; i != (list.length - 1) ~/ 2; ++i) {
        final key =
            needToEncodeKeys ? _encodeKey(list[i * 2 + 1]) : list[i * 2 + 1];
        final value = list[i * 2 + 2];
        result[key] = value;
      }
      return result;
    }
  
    /// JSON-encodes an `Object` key so it can be stored as a `String`. Needed
    /// because JSON maps are only allowed strings as keys.
    String _encodeKey(Object key) {
      return JSON.encode(key);
    }
  
    /// Converts [StandardJsonPlugin] serialization output, a `Map`, to a `List`,
    /// when the serialized type is known statically.
    List _toList(Map map, bool hasEncodedKeys) {
      final result = new List(map.length * 2);
      var i = 0;
      map.forEach((key, value) {
        // Drop null values, they are represented by missing keys.
        if (value == null) return;
  
        result[i] = hasEncodedKeys ? _decodeKey(key as String) : key;
        result[i + 1] = value;
        i += 2;
      });
      return result;
    }
  
    /// Converts [StandardJsonPlugin] serialization output, a `Map`, to a `List`,
    /// when the serialized type is not known statically. The type is retrieved
    /// from the [discriminator] field.
    List _toListUsingDiscriminator(Map map) {
      var type = map[discriminator];
  
      if (type == null) {
  