Deserialize maps as maps

The maps are already being serialized as maps, and serde_json will detect
that despite us claiming that maps are seqs, it falls back to parsing them
as maps; however, serde-json-core does not have that fallback logic, so it
makes more sense to give the correct hint here (especially when this is
merged: https://github.com/japaric/serde-json-core/pull/23)
This commit is contained in:
David Flemström 2019-11-18 22:23:07 +01:00
parent 5ffd0df2cc
commit c8ef15f23f

View File

@ -182,7 +182,7 @@ where
Ok(values)
}
}
deserializer.deserialize_seq(ValueVisitor(PhantomData))
deserializer.deserialize_map(ValueVisitor(PhantomData))
}
}
@ -225,7 +225,7 @@ where
Ok(values)
}
}
deserializer.deserialize_seq(ValueVisitor(PhantomData))
deserializer.deserialize_map(ValueVisitor(PhantomData))
}
}