mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-05 23:16:50 +08:00
refactor:json to struct
This commit is contained in:
@@ -139,10 +139,10 @@ func TestJsonToStruct3(t *testing.T) {
|
||||
}
|
||||
|
||||
type Student struct {
|
||||
Name string `json:"name"`
|
||||
Age int `json:"age"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Age int `json:"age,omitempty"`
|
||||
Address Address `json:"address"`
|
||||
Scores []Score `json:"scores"`
|
||||
Scores []Score `json:"scores,omitempty"`
|
||||
}
|
||||
jsonStr4 := `{
|
||||
"name": "Alice",
|
||||
|
Reference in New Issue
Block a user