- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 42 for ContentTypeJSON (0.4 sec)
-
staging/src/k8s.io/cli-runtime/pkg/resource/scheme.go
jsonInfo, _ := runtime.SerializerInfoForMediaType(scheme.Codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) jsonInfo.Serializer = dynamicCodec{} jsonInfo.PrettySerializer = nil return rest.ContentConfig{ AcceptContentTypes: runtime.ContentTypeJSON, ContentType: runtime.ContentTypeJSON, NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(jsonInfo), }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 21 15:58:15 UTC 2022 - 2.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/embedded.go
e.ContentEncoding = "" e.ContentType = ContentTypeJSON return nil } // Marshal may get called on pointers or values, so implement MarshalJSON on value. // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go func (e Unknown) MarshalJSON() ([]byte, error) { // If ContentType is unset, we assume this is JSON. if e.ContentType != "" && e.ContentType != ContentTypeJSON {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Dec 02 09:39:03 UTC 2019 - 4.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/apis/audit/fuzzer/fuzzer.go
ContentType: runtime.ContentTypeJSON, } } switch c.RandBool() { case true: e.ResponseObject = nil case false: e.ResponseObject = &runtime.Unknown{ TypeMeta: runtime.TypeMeta{APIVersion: "", Kind: ""}, Raw: []byte(`{"apiVersion":"","kind":"Pod","someKey":"someValue"}`), ContentType: runtime.ContentTypeJSON, } } },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 04 16:10:17 UTC 2017 - 2.1K bytes - Viewed (0) -
pkg/scheduler/framework/runtime/registry.go
} if configuration.Raw == nil { return nil } switch configuration.ContentType { // If ContentType is empty, it means ContentTypeJSON by default. case runtime.ContentTypeJSON, "": return json.Unmarshal(configuration.Raw, into) case runtime.ContentTypeYAML: return yaml.Unmarshal(configuration.Raw, into) default:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 20 09:49:54 UTC 2023 - 3.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/embedded_test.go
} test := obj.(*runtimetesting.ObjectTest) if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != "{}" || unk.ContentType != runtime.ContentTypeJSON { t.Fatalf("unexpected object: %#v", test.Items[0]) } if *gvk != externalGVK { t.Fatalf("unexpected kind: %#v", gvk) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 06 16:07:10 UTC 2020 - 9.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/test/runtime_helper_test.go
&runtime.Unknown{ TypeMeta: runtime.TypeMeta{Kind: "Carp", APIVersion: "v1"}, Raw: []byte(`{"kind":"Carp","apiVersion":"` + "v1" + `","metadata":{"name":"test"}}`), ContentType: runtime.ContentTypeJSON, }, }, } _, codecs := TestScheme() Codec := apitesting.TestCodec(codecs, testapigroup.SchemeGroupVersion) if errs := runtime.DecodeList(pl.Items, Codec); len(errs) != 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 01 19:31:12 UTC 2018 - 1.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/types.go
// +optional Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"` } const ( ContentTypeJSON string = "application/json" ContentTypeYAML string = "application/yaml" ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" ) // RawExtension is used to hold extensions in external versions.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 27 19:12:58 UTC 2023 - 4.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/openapi/resolver/discovery.go
c, ok := p[resourcePath] if !ok { return nil, fmt.Errorf("cannot resolve group version %q: %w", gvk.GroupVersion(), ErrSchemaNotFound) } b, err := c.Schema(runtime.ContentTypeJSON) if err != nil { return nil, err } resp := new(schemaResponse) err = json.Unmarshal(b, resp) if err != nil { return nil, err } ref, err := resolveRef(resp, gvk) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 17:23:50 UTC 2023 - 2.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go
mf, scheme, scheme, json.SerializerOptions{Yaml: false, Pretty: false, Strict: options.Strict}, ) jsonSerializerType := serializerType{ AcceptContentTypes: []string{runtime.ContentTypeJSON}, ContentType: runtime.ContentTypeJSON, FileExtensions: []string{"json"}, EncodesAsText: true, Serializer: jsonSerializer, Framer: json.Framer, StreamSerializer: jsonSerializer, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 12.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/apis/example/fuzzer/fuzzer.go
// We do not set TypeMeta here because it is not carried through a round trip Raw: []byte(`{"apiVersion":"unknown.group/unknown","kind":"Something","someKey":"someValue"}`), ContentType: runtime.ContentTypeJSON, } } else { types := []runtime.Object{&example.Pod{}} t := types[c.Rand.Intn(len(types))] c.Fuzz(t) *j = t } }, func(r *runtime.RawExtension, c fuzz.Continue) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 01 19:31:12 UTC 2018 - 3K bytes - Viewed (0)