You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support for type information using typescript decorators ? #91
Hi, Thank for your work on this library.
I have one question:
Do you have some plans to add features to serialize/deserialize using specific types? like the type reflection in C# using the typescript decorators and reflect-metadata api. https://www.typescriptlang.org/docs/handbook/decorators.html.
The goal is to be able to encode/decode some class in a custom way like with IMessagePackFormatter<T> in https://github.com/neuecc/MessagePack-CSharp.
This is a peer to @msgpack/msgpack - in future it would be more efficient to fork and integrate directly, and even better would be codegen like protobufjs.
Activity
gfx commentedon Nov 19, 2019
Thanks. This seems an interesting idea, but decorators are not standardized yet, so I won't implement them for the time being.
rmja commentedon Feb 19, 2021
@prunelsigma I have made a very basic version of this over here: https://github.com/utiliread/ur-msgpack
Feel free to use any part of it.
See the tests for example use: https://github.com/utiliread/ur-msgpack/blob/master/src/deserialize.spec.ts
For example:
camnewnham commentedon Mar 2, 2022
I've created a similar library which supports unions (similar to MessagePack C#), over at https://github.com/camnewnham/msgpack-decorators
Example definition:
Example usage:
This is a peer to @msgpack/msgpack - in future it would be more efficient to fork and integrate directly, and even better would be codegen like
protobufjs.