- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for NewSerializer (0.19 sec)
-
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go
recognizes: true, }, { in: []byte{0xff, 0xff, 0xff, 0x01, 0x02, 0x03}, recognizes: false, }, } { t.Run(hex.EncodeToString(tc.in), func(t *testing.T) { s := NewSerializer(nil, nil) recognizes, unknown, err := s.RecognizesData(tc.in) if recognizes != tc.recognizes { t.Errorf("expected recognized to be %t, got %t", tc.recognizes, recognizes) } if unknown {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 13 14:57:12 UTC 2024 - 20.1K bytes - Viewed (0) -
pkg/api/testing/unstructured_test.go
jsonSerializer := jsonserializer.NewSerializerWithOptions(jsonserializer.DefaultMetaFactory, legacyscheme.Scheme, legacyscheme.Scheme, jsonserializer.SerializerOptions{}) cborSerializer := cborserializer.NewSerializer(legacyscheme.Scheme, legacyscheme.Scheme) // original->JSON->Unstructured buf.Reset() if err := jsonSerializer.Encode(item, &buf); err != nil { t.Fatalf("error encoding native to json: %v", err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 16.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go
return false, apierrors.NewInternalError(fmt.Errorf("admission webhook %q attempted to modify the object, which is not supported for this operation", h.Name)) } var patchedJS []byte jsonSerializer := json.NewSerializer(json.DefaultMetaFactory, o.GetObjectCreater(), o.GetObjectTyper(), false) switch result.PatchType { // VerifyAdmissionResponse normalizes to v1 patch types, regardless of the AdmissionReview version used
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 19.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go
gvk := schema.GroupVersionKind{Group: "group", Version: "version", Kind: "MockCacheableObject"} creater := &mockCreater{obj: &runtimetesting.MockCacheableObject{}} typer := &mockTyper{gvk: &gvk} serializer := json.NewSerializer(json.DefaultMetaFactory, creater, typer, false) runtimetesting.CacheableObjectTest(t, serializer) } type mockCreater struct { apiVersion string kind string err error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 04 15:55:02 UTC 2024 - 40K bytes - Viewed (0)