func (d *Decoder) Decode(req Request, into runtime.Object) error {
	if len(req.Object.Raw) == 0 {
		return fmt.Errorf("there is no content to decode")
	}
	return d.DecodeRaw(req.Object, into)
}
Decode decodes the inlined object in the AdmissionRequest into the passed-in runtime.Object.
If you want decode the OldObject in the AdmissionRequest, use DecodeRaw.
It errors out if req.Object.Raw is empty i.e. containing 0 raw bytes.
package admission
import (
	"fmt"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/serializer"
	"k8s.io/apimachinery/pkg/util/json"
)
type Decoder struct {
	codecs serializer.CodecFactory
}
func NewDecoder(scheme *runtime.Scheme) (*Decoder, error) {
	return &Decoder{codecs: serializer.NewCodecFactory(scheme)}, nil
}