Open
Description
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.
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
.