#[derive(Clone, serde::Serialize, PartialEq, Eq, PartialOrd, Ord)]
struct SomethingKey {
x: u16,
y: u16,
}
#[derive(Clone, serde::Serialize, PartialEq, Eq, PartialOrd, Ord)]
struct Something {
title: String,
path: PathBuf,
}
#[derive(Clone, serde::Serialize)]
pub struct Payload {
stuff: HashMap<String, BTreeMap<SomethingKey, Something>>,
}
I cannot send the payload over to the frontend, likely because of the u16 keys of the BTreeMap. Is it possible to somehow convert the keys to string before sending them, maybe? Or some other solution? I've tried using #[serde_as] but to no avail