diff --git a/README.md b/README.md index b9b69dd..363f3e9 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,7 @@ ok github.com/vingarcia/kissorm 21.740s - Improve error messages - Add tests for tables using composite keys - Add support for serializing structs as other formats such as YAML +- Update structs.FillStructWith to work with `json` tagged attributes ### Optimizations Oportunities diff --git a/examples/example_service/example_service.go b/examples/example_service/example_service.go index ae8ff65..8347228 100644 --- a/examples/example_service/example_service.go +++ b/examples/example_service/example_service.go @@ -30,6 +30,15 @@ type UserEntity struct { Age *int `kissorm:"age"` Score *int `kissorm:"score"` LastPayment time.Time `kissorm:"last_payment"` + Address *Address `kissorm:"address,json"` +} + +// Address contains the user's address +type Address struct { + AddrLines []string `json:"addr_lines"` + City string `json:"city"` + State string `json:"state"` + Country string `json:"country"` } // NewUserService ...