Comments (8)
This is probably a code gen bug, will look Into it
from wire.
Thanks
from wire.
My bad, actually the error happened because Wire can't deserialize the properties without setters.
I was actually testing this, which can be deserialized without error:
public class ClassWithNonDefaultCtor
{
public ClassWithNonDefaultCtor(string prop1, int prop2)
{
Prop1 = prop1;
Prop2 = prop2;
}
public string Prop1 { get; }
public int Prop2 { get; }
}
Then tried changing it to struct, which failed:
public class StructValueWithNonDefaultCtor
{
public StructValueWithNonDefaultCtor(string prop1, int prop2)
{
Prop1 = prop1;
Prop2 = prop2;
}
public string Prop1 { get; }
public int Prop2 { get; }
}
from wire.
I'm seeing this as well, assuming you meant for your second example to be
public struct StructValueWithNonDefaultCtor
{
...
}
I also have some structures with public readonly fields, rather than readonly properties.
from wire.
@mellinoe, thanks for the correction. Wrongly copy-paste-edited.
I think it make sense for the deserializer to fail since it can't write to read-only fields and properties.
from wire.
@rogeralsing, I'm still looking to make NodaTime workable across Akka nodes. However, due to the issue above, NodaTime won't naturally serialize on its own and I'm thinking of using Wire's surrogate feature to make it happen. But I'm not sure how to do that with Akka-Wire implementation. Any hint?
from wire.
@rogeralsing Hi! Do you have any updated regarding this issue? I run into the same problem when serializing a structure with non-default constructor. This ticket has been closed a month ago but final resolution is unknown.
from wire.
@ia64mail AFAIK this issue remains unresolved on Wire, but it has been fixed on Hyperion (akka.net fork of Wire) as of akkadotnet/Hyperion#9
from wire.
Related Issues (20)
- NVM
- Serialization of F# Map HOT 4
- Is Serializer thread safe? HOT 2
- AmbiguousMatchException when serializing a type with multiple AddRange methods HOT 1
- Invalid code generation on fields of interface type HOT 5
- 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.