Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation of CandidType for serde_json::Value #259

Open
lastmjs opened this issue Jul 9, 2021 · 0 comments
Open

Add implementation of CandidType for serde_json::Value #259

lastmjs opened this issue Jul 9, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@lastmjs
Copy link
Contributor

lastmjs commented Jul 9, 2021

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.

@lastmjs lastmjs added the enhancement New feature or request label Jul 9, 2021
ninegua pushed a commit to ninegua/candid that referenced this issue Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant