Closed gitmalet closed 1 year ago
Thanks, I did both changes (and a cargo format
run) and squashed the commits so that they (hopefully) make sense again.
Hi. The message pack serialization should be checked in the test_serialization
macro in test_utils
crate like you initial change. And wasm and no_std builds fail due to reason mentioned before.
Sorry for the delay. Unit tests run through on my local machine now at least. Also the no-std builds should work as well.
A notable downside of this PR is that the error messages are now generic as well. I am not sure how important this is.
Thanks @gitmalet . LGTM.
Hi,
Types that contain fields serialized as
FieldBytes
orAffineGroupBytes
did not properly serialize with serialization crates other thanserde_json
. The first commit here adds a few lines to the serialization tests that check serialization withrmp_serde
(i.e., a crate where it does not work currently). The errors can be seen there. The second commit changes the implementations ofFieldBytes
andAffineGroupBytes
by implementing them as a generic version of the expansion of serde_conv!. Serializing types with this new implementation now works under bothserde_json
andrmp_serde
.Please consider merging this in order to allow serialization with RMP (and possibly other serialization crates).