You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, is there any way to rename a tag?
Let’s say I have this YAML file, featuring a serialised
something
that can be eitherlocal
ordistant
, internally tagged:Let’s say I had this in Rust with serde, which successfully allows to deserialise the file into a
Config
:Now, the closest I’ve found in Python is to write this:
But this means I need to have a YAML file like this instead:
As there is no such thing as an enum with fields in Python, I don’t see how to properly name the variants. Is there anyway with
pyserde
?Beta Was this translation helpful? Give feedback.
All reactions