1
0
mirror of https://github.com/json-iterator/go.git synced 2025-07-03 23:30:41 +02:00

#157 number can be null

This commit is contained in:
Tao Wen
2017-09-05 13:00:03 +08:00
parent d80309af3b
commit db32ee8c2d
6 changed files with 98 additions and 8 deletions

View File

@ -316,7 +316,7 @@ func Test_recursive_empty_interface_customization(t *testing.T) {
}
type GeoLocation struct {
Id string `json:"id,omitempty" db:"id"`
Id string `json:"id,omitempty" db:"id"`
}
func (p *GeoLocation) MarshalJSON() ([]byte, error) {
@ -337,4 +337,4 @@ func Test_marshal_and_unmarshal_on_non_pointer(t *testing.T) {
err = Unmarshal([]byte("[1]"), &locations)
should.Nil(err)
should.Equal("hello", locations[0].Id)
}
}