Comments (5)
I will continue to dig in this.
It could be that Wire incorrectly encodes the type of the payload as the interface type, and once it tries to deserialize, it might try to create an instance of the interface.
Which is ofcourse not possible.
I will keep updating here.
from wire.
And what is wrong always work only with contents end-types (not declared field/property types)?
from wire.
It uses both the field type and the content type.
- if they both match, it can optimize the flow.
- If they differ, there is another path.
the problem currently with the interfaces in the fields, is that the code generator tries to do things that are not possible on an interface type.
from wire.
I have added tests for this,
The tests however pass and the interface field is serialized just fine.
I need to create tests for the specific messages in Akka.NET that uses interface fields to see why that fails.
from wire.
Maybe this can help. I've made some local modification in Wire to make exceptions give more data and managed to trace the problem.
Akka.Cluster.Tools.PublishSubscribe.Internal.Bucket
has the field public readonly IImmutableDictionary<string, ValueHolder> Content
.
The problem is in the Wire.SerializerFactories.ImmutableCollectionsSerializerFactory.BuildSerializer
.
var typeName = type.Name;
var genericSufixIdx = typeName.IndexOf('`');
typeName = genericSufixIdx != -1 ? typeName.Substring(0, genericSufixIdx) : typeName;
var creatorType =
Type.GetType(
ImmutableCollectionsNamespace + "." + typeName + ", " + ImmutableCollectionsAssembly, true);
For this field creatorType
tries to load type System.Collections.Immutable.IImmutableDictionary, System.Collections.Immutable
and there is no such type (Type load exception).
Unfortunately, I don't have enough understanding of the code to get the meaning of such type name conversion (as you are not guaranteed to have a type with the same name as generic, but without generic parameters).
from wire.
Related Issues (20)
- NVM
- Serialization of F# Map HOT 4
- No support for struct with a non-default constructor? HOT 8
- Is Serializer thread safe? HOT 2
- AmbiguousMatchException when serializing a type with multiple AddRange methods HOT 1
- Wire performance improvements HOT 3
- CollectionTests.CanSerializeDictionaryKeysAndValuesByteChar is failing HOT 1
- Wire 0.8.2 is not compatible with 0.8.1 HOT 6
- Stack overflow when serializing/deserializing LinkedList
- OSS license for Wire HOT 2
- Support for IDictionary HOT 3
- Serialize - DeSerialize between similar types. HOT 4
- Speedup dials to compare performance with bond simple binary protocol.
- .NET Core serialization issues
- Signed Wire NuGet package
- support DataContract/DataMember/IgnoreDataMember
- Does wire do zig-zag / 7bit encoding?
- Wire.Extensions.TypeEx CoreAssemblyName ignore mscorelib/System.Private.CoreLib
- .NET Core 3 - Cannot Deserialize
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wire.