I am implementing #[attr(default = <literal>)], and my value can be multi-typed depending on what it gets attached to. The serde_json::Value is the format I will eventually have to work with. Darling seem to have the needed from_value() functions, but I am not too certain how to use it to convert from a syn::Lit into serde_json::Value, possibly via some magical match statement? Thx!
I am implementing
#[attr(default = <literal>)]
, and my value can be multi-typed depending on what it gets attached to. Theserde_json::Value
is the format I will eventually have to work with. Darling seem to have the neededfrom_value()
functions, but I am not too certain how to use it to convert from asyn::Lit
intoserde_json::Value
, possibly via some magicalmatch
statement? Thx!