Created
November 16, 2021 08:00
-
-
Save ilantoren/50372c47564c12f3499f21be532efd40 to your computer and use it in GitHub Desktop.
Defining struct for serde
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Serialize,Deserialize, Debug)] | |
pub struct Restaurant { | |
cuisine: String, | |
borough: String, | |
name: String, | |
address: Address | |
} | |
#[derive(Serialize, Deserialize, Debug)] | |
pub struct Address { | |
building: String, | |
street: String, | |
zipcode: String, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment