Skip to content
Discussion options

You must be logged in to vote

You can use As to make the DeserializeAs types compatible with the plain serde(with=...). You have to take care of all the actions the serde_as macro does, especially replacing _ with Same.

So I think this should work here:

let custom_props: HashMap<String, String> = As::<MapPreventDuplicates<Same, Same>>::deserialize(deserializer)?;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@drewlwhitney
Comment options

@drewlwhitney
Comment options

Answer selected by drewlwhitney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants