We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! How can I get json from MySql to my model struct? Is this possible?
type Cargo struct { Id int64 `json:"id"` CompanyId int64 `json:"companyId"` ShipperId int64 `json:"shipperId"` ConsigneeId int64 `json:"consigneeId"` ConsigneeContacts ConsigneeContacts `json:"consigneeContacts"` Type int ShippingName string `json:"shippingName"` ReceiptNumber int `json:"receiptNumber"` IncomingDate null.Time `json:"incomingDate"` PackagesNumber int `json:"packagesNumber"` Volume float64 `json:"volume"` Weight float32 `json:"weight"` Status string `json:"status"` WaggonObservedId int `json:"waggonObservedId"` Note string `json:"'note'"` CreatorId int `json:"creatorId"` CreatedAt null.Time `json:"createdAt"` } type ConsigneeContacts struct { Phones []string `json:"phones"` Emails []string `json:"emails"` }
{"emails": ["[email protected]"], "phones": ["9161234567"]}
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
How can I get json from MySql to my model struct?
Is this possible?
{"emails": ["[email protected]"], "phones": ["9161234567"]}
Thanks!
The text was updated successfully, but these errors were encountered: