We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a struct contains an Any value, and the Any value is left unset, then Marshal fails with a nil pointer dereference.
eg
package main import ( "fmt" jsoniter "github.com/json-iterator/go" ) type Foo struct { A jsoniter.Any } func main() { data, _ := jsoniter.Marshal(&Foo{}) fmt.Println(string(data)) }
The SEGV occurs here:
github.com/json-iterator/go.(*directAnyCodec).Encode(0x132e3a0, 0xc00000e990, 0xc000058180) github.com/json-iterator/go@v1.1.5/any.go:315 +0x29
The text was updated successfully, but these errors were encountered:
5916df6
fix json-iterator#311 handle nil any
edece26
No branches or pull requests
If a struct contains an Any value, and the Any value is left unset, then Marshal fails with a nil pointer dereference.
eg
The SEGV occurs here:
github.com/json-iterator/go.(*directAnyCodec).Encode(0x132e3a0, 0xc00000e990, 0xc000058180)
github.com/json-iterator/go@v1.1.5/any.go:315 +0x29
The text was updated successfully, but these errors were encountered: