RoadSign/pkg/sign/deserializer.go
2023-11-18 01:42:04 +08:00

11 lines
169 B
Go

package sign
import "encoding/json"
func DeserializeOptions[T any](data any) T {
var out T
raw, _ := json.Marshal(data)
_ = json.Unmarshal(raw, &out)
return out
}