-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
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
[Bug] - Error on latest release #235
Comments
@sujit-baniya |
@goccy Where should I put @goccy Issue is replicated using this code: type TaskMessage struct {
Type string
Payload map[string]interface{}
UniqueKey string
}
func main() {
msg := TaskMessage{
Payload: map[string]interface{}{
"sent_at": map[string]interface{}{
"Time": "0001-01-01T00:00:00Z",
"Valid": false,
},
},
}
b, err := json.Marshal(msg)
if err != nil {
panic(err)
}
fmt.Println(string(b))
} It seems the order in the struct matters. If UniqueKey is above Payload, it works |
@sujit-baniya |
@goccy I've added code to replicate the issue type TaskMessage struct {
Type string
Payload map[string]interface{}
UniqueKey string
}
func main() {
msg := TaskMessage{
Payload: map[string]interface{}{
"sent_at": map[string]interface{}{
"Time": "0001-01-01T00:00:00Z",
"Valid": false,
},
},
}
b, err := json.Marshal(msg)
if err != nil {
panic(err)
}
fmt.Println(string(b))
} |
Thank you for the more detail information. I will fix this issue with #236 |
@sujit-baniya I released |
I'm getting errors when trying to upgrade to latest version.
The text was updated successfully, but these errors were encountered: