candid
candid copied to clipboard
Add implementation of CandidType for serde_json::Value
See this forum post for more information: https://forum.dfinity.org/t/derive-candidtype-with-serde-json/5800
Seems it would be nice for candid
to implement CandidType
on serde_json::Value
. This would allow for candid serialization of arbitrary JSON values. I would implement CandidType
myself, but in my crates I am depending on serde_json::Value
and candid
directly, thus I can't implement CandidType
without relying on some kind of wrapper around serde_json::Value
. Seems serde_json::Value
is the canonical way to serialize and deserialize arbitrary JSON in Rust, so could it be added to the library here? https://github.com/dfinity/candid/blob/master/rust/candid/src/types/impls.rs
I am happy to do the work if it would be accepted.