Microservices can interact with different participants, such as clients, other microservices, and third-party APIs. Typically, interactions are performed by the network using serialized data messages in a certain format. In this section, we'll learn how to choose a format for these interactions. We'll also explore the basic features of a serde crate – how to make our structs serializable and use a specific format.
Data formats for interaction with microservices
The serde crate
When I started to use Rust in my projects, I used to use the popular rustc_serialize crate. This wasn't bad, but I found that it wasn't flexible enough. For example, I couldn't use generic data types in my own...