Skip to content

make serde for Map feature-aware#161

Closed
snpschaaf wants to merge 3 commits intoGREsau:masterfrom
snpschaaf:feature-aware-serde-for-map
Closed

make serde for Map feature-aware#161
snpschaaf wants to merge 3 commits intoGREsau:masterfrom
snpschaaf:feature-aware-serde-for-map

Conversation

@snpschaaf
Copy link

@snpschaaf snpschaaf commented Jul 12, 2022

The definition of the Map type is determined by feature. The suggestion is to provide a module which proxys custom serde functions matching to the actual Map type.

Consuming crates could use this module in order to easily serialize a schemars::Map via
#[serde(with = "schemars::map_serde")] without knowing what the actual type looks like.

The IndexMap is doing this similarly: https://docs.rs/indexmap/latest/indexmap/serde_seq/index.html

Signed-off-by: Philippe Schaaf <philippe.schaaf@secunet.com>
Signed-off-by: Simon Bechstedt <simon.bechstedt@secunet.com>
Signed-off-by: Simon Bechstedt <simon.bechstedt@secunet.com>
SBechstedt added a commit to snpschaaf/okapi that referenced this pull request Jul 13, 2022
Use patched version until PR GREsau/schemars#161 is merged.

Signed-off-by: Simon Bechstedt <simon.bechstedt@secunet.com>
SBechstedt added a commit to snpschaaf/okapi that referenced this pull request Jul 13, 2022
Use patched version until PR GREsau/schemars#161 is merged.

Signed-off-by: Simon Bechstedt <simon.bechstedt@secunet.com>
@snpschaaf snpschaaf closed this Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants