-
-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Seems realted with #234.
package main
import (
"fmt"
"encoding/json"
gjson "github.com/goccy/go-json"
)
type MyType struct {
Msg string `json:"Сообщение"`
}
func main() {
b := []byte(`{"Сообщение":"Текст"}`)
var expected MyType
json.Unmarshal(b, &expected)
fmt.Printf("got json object: %+v\n", expected)
var actual MyType
gjson.Unmarshal(b, &actual)
fmt.Printf("got gjson object: %+v\n", actual)
}
Exptected
got json object: {Msg:Текст}
got gjson object: {Msg:Текст}
Actual
got json object: {Msg:Текст}
got gjson object: {Msg:}
go version go1.19.3 linux/amd64
github.com/goccy/go-json v0.10.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working