RoadSign/pkg/sign/deserializer.go

11 lines
169 B
Go
Raw Normal View History

2023-11-17 17:42:04 +00:00
package sign
2023-11-17 16:23:40 +00:00
import "encoding/json"
func DeserializeOptions[T any](data any) T {
var out T
raw, _ := json.Marshal(data)
_ = json.Unmarshal(raw, &out)
return out
}