Open justinmoon opened 4 years ago
I think this one is quite possible using the serde untagged enum representation: https://serde.rs/enum-representations.html#untagged
#[derive(Serialize, Deserialize)]
#[serde(untagged)]
pub enum Label {
#[serde(default)]
Name(String),
#[deprecated(note = "will be removed in Bitcoin Core v0.21")]
Info {
name: String,
purpose: String,
},
}
Or something.
It seems like right now this field contains mixed content:
Right now my 0.20 node causes a bad response because
rust-bitcoincore-rpc
can't interpret the leading "string" value.