Yaserde's skip_serializing_if requires a method name and serde's skip_serializing_if requires a function name. This means that I need both attributes, if I want my both JSON and XML representation to skip serializing this field.
However when I put them both on I get this error:
error: proc-macro derive panicked
--> gedcomx-cli/src/main.rs:18:21
|
18 | #[derive(Serialize, YaSerialize)]
| ^^^^^^^^^^^
|
= help: message: `"Option::is_none"` is not a valid identifier
So it appears that yaserde is trying to read the serde macro. So I'd have to write a custom serializer today if I want this behavior.
I'm not sure if this is intentional or not, but it seems dangerous when we want serde and yaserde to coexist.
I have a struct like this:
Yaserde's
skip_serializing_if
requires a method name and serde'sskip_serializing_if
requires a function name. This means that I need both attributes, if I want my both JSON and XML representation to skip serializing this field.However when I put them both on I get this error:
So it appears that yaserde is trying to read the serde macro. So I'd have to write a custom serializer today if I want this behavior.