JSON has no concept of something resembling an enum. As many languages do work with them, however, multiple conventions on how to handle the conversion from JSON into enum have emerged over the years. Serde allows you to support these conventions with annotations on your enums. For a full list of supported conversions, visit https://serde.rs/enum-representations.html.