mirror of https://github.com/dapr/quickstarts.git
Merge pull request #714 from sunzhaochang/fix-struct-json-tag
Fix struct tag for json
This commit is contained in:
commit
37b6f5cfd2
|
|
@ -35,13 +35,13 @@ var (
|
|||
)
|
||||
|
||||
type Orders struct {
|
||||
Orders []Order `json:orders`
|
||||
Orders []Order `json:"orders"`
|
||||
}
|
||||
|
||||
type Order struct {
|
||||
OrderId int `json:orderid`
|
||||
Customer string `json:customer`
|
||||
Price float64 `json:price`
|
||||
OrderId int `json:"orderid"`
|
||||
Customer string `json:"customer"`
|
||||
Price float64 `json:"price"`
|
||||
}
|
||||
|
||||
func processBatch(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ var (
|
|||
)
|
||||
|
||||
type Orders struct {
|
||||
Orders []Order `json:orders`
|
||||
Orders []Order `json:"orders"`
|
||||
}
|
||||
|
||||
type Order struct {
|
||||
OrderId int `json:orderid`
|
||||
Customer string `json:customer`
|
||||
Price float64 `json:price`
|
||||
OrderId int `json:"orderid"`
|
||||
Customer string `json:"customer"`
|
||||
Price float64 `json:"price"`
|
||||
}
|
||||
|
||||
func processBatch(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue