Comments (3)
At least the following works perfectly fine if I rename @namespace and the corresponding property to something different:
Ok, my curiosity is peaked. If you send me a minimal repro I'll be happy to take a look.
from messagepack-csharp.
The @
prefix isn't part of the parameter name. That's just C# syntax. At runtime, where MessagePack is reflecting over your members, there is no @
character. So that's not the problem.
Why are you using the JsonConstructor
attribute if you're using MessagePack? In fact I don't see any messagepack attributes at all on this class, so I wonder why you expect it to work.
You mention using Typeless. But to work without attributes, you need to write a custom formatter, or use the Contractless
resolver.
from messagepack-csharp.
@AArnott Thanks for the reply.
The @ prefix isn't part of the parameter name. That's just C# syntax. At runtime, where MessagePack is reflecting over your members, there is no @ character. So that's not the problem.
I admit, I have not checked in detail and I know the verbatim operator is just an escape character, but I was thinking it might probably get included in the name that is reported by reflection or something similar.
Why are you using the JsonConstructor attribute if you're using MessagePack?
The whole reason for me to use MessagePack is for caching reasons. I load a huge JSON payload with System.Text.Json
. This process is quite slow compared to the binary deserialization MessagePack offers.
In fact I don't see any messagepack attributes at all on this class, so I wonder why you expect it to work.
You mention using Typeless. But to work without attributes, you need to write a custom formatter, or use the Contractless resolver.
I don't think this is true. At least the following works perfectly fine if I rename @namespace
and the corresponding property to something different:
var data = await MessagePackSerializer.Typeless
.DeserializeAsync(fs, default, cancellationToken)
.ConfigureAwait(false);
I'm not using any attributes (for now) because the JSON payload is pretty complex and consists of 50-100 sub-classes which I didn't want to annotate during the evaluation/test phase for MessagePack 🙂
from messagepack-csharp.
Related Issues (20)
- [NuGet] 2.5.168 published on nuget.org, missing from GitHub HOT 3
- MsgPack003 is not reported on generic typed members
- MessagePackReader - get the array length HOT 3
- Integer 10 and newline ('\n') are considered same when data send through UART HOT 1
- MPC generated incorrected GetFormatter() that lists the unnecessary Generic Array Fomatter. HOT 2
- Where is the unity package file? HOT 15
- MessagePack.FormatterNotRegisteredException: UnityEngine.Vector3 is not registered in resolver (v3.0.54-alpha) HOT 3
- Some source generator issues HOT 3
- Concern about endianness byte ordering in UnsafeBlitFormatter HOT 1
- Unity CodeGen does not check whether donet SDK/runtime was installed HOT 5
- Unity CodeGen does not complete checking until mouse moved HOT 1
- Is it possible to implement a optional reflection serialize/deserialize way? HOT 1
- How to send Data T with a enum tag? HOT 1
- WEBGL - FormatterNotRegisteredException HOT 1
- Non-seek-able stream gets read completely, erasing all data that does after MsgPack object HOT 1
- Updating from a very old version HOT 2
- Hi this code not work as the doc.
- Using serialization from within a custom serializer. HOT 12
- Is MESSAGEPACK_FORCE_AOT necessary? HOT 4
- Serialization of complex object using Typeless is producting huge output sizes HOT 4
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 messagepack-csharp.