mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-10-02 14:54:30 +00:00
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:
parent
5ffd0df2cc
commit
c8ef15f23f
@ -182,7 +182,7 @@ where
|
|||||||
Ok(values)
|
Ok(values)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deserializer.deserialize_seq(ValueVisitor(PhantomData))
|
deserializer.deserialize_map(ValueVisitor(PhantomData))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ where
|
|||||||
Ok(values)
|
Ok(values)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deserializer.deserialize_seq(ValueVisitor(PhantomData))
|
deserializer.deserialize_map(ValueVisitor(PhantomData))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user