Closed seanchann closed 8 years ago
Please attach a reproducer that can be run via "go run repro.go" or "go test".
I just tested with the code below, and it works.
package main
import ( "fmt" "github.com/ugorji/go/codec" )
func main() {
var a interface{}
var ss = { "test":{ "key1": null, "key2": null, "key3":"test3" } }
var s = []byte(ss)
var h codec.JsonHandle
codec.NewDecoderBytes(s, &h).Decode(&a)
fmt.Printf("a is now: %v of type: %T and is nil: %v\n", a, a, a == nil)
}
Output:
a is now: map[test:map[key1:
@ugorji sorry, will retry it!
hi: if have json:
decode will be throw error : " json: expect char '\\"' but got char 'n'"
I think if have null may be give a empty string to filed?