iddm / serde-aux

An auxiliary serde library providing helpful functions for serialisation and deserialisation for containers, struct fields and others.
MIT License
152 stars 26 forks source link

Provide a way of serializing and deseriaizing a enum number #1

Closed iddm closed 6 years ago

iddm commented 6 years ago

Enum with numbers are not supported by the serde. This is usually done with implementing a macro. This crate could have such a procedural macro which could generate everything on the fly.

iddm commented 6 years ago

A usual rust macro was made here: https://github.com/vityafx/serde-aux/commit/25b0fb00341cfb78f2a56e5889c960726a408639

iddm commented 6 years ago

Procedural macro still needs to be written.

naftulikay commented 6 years ago

It seems to be implemented, but serialize is somehow missing.

iddm commented 6 years ago

@naftulikay yes, you're right, I forgot the serialization part. Gonna be there soon.

iddm commented 6 years ago

@naftulikay Added serialize in 0.5.3.

naftulikay commented 6 years ago

Thanks so much!