alloy
alloy copied to clipboard
[Bug] WithOtherFields duplicates on deserialize
Component
network, json-rpc, provider, pubsub
What version of Alloy are you on?
main
Operating System
None
Describe the bug
the WithOtherFields
contains two serde(flatten)
with one being a catch all map.
due to how serde flatten behaves, the Otherfields
will always contain all key values of the object.
this isn't easy to fix, and would require a lot of custom serde.
a quick fix would be to serialize the inner
into a serde_json::Map and remove those keys from the serde_Value we serialized into initially
cc @klkvr