Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for NewSerializerWithOptions (0.36 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go

    // Deprecated: use NewSerializerWithOptions instead.
    func NewYAMLSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper) *Serializer {
    	return NewSerializerWithOptions(meta, creater, typer, SerializerOptions{true, false, false})
    }
    
    // NewSerializerWithOptions creates a JSON/YAML serializer that handles encoding versioned objects into the proper JSON/YAML
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 25 16:08:07 UTC 2022
    - 12K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go

    		StreamSerializer: jsonSerializer,
    	}
    	if options.Pretty {
    		jsonSerializerType.PrettySerializer = json.NewSerializerWithOptions(
    			mf, scheme, scheme,
    			json.SerializerOptions{Yaml: false, Pretty: true, Strict: options.Strict},
    		)
    	}
    
    	strictJSONSerializer := json.NewSerializerWithOptions(
    		mf, scheme, scheme,
    		json.SerializerOptions{Yaml: false, Pretty: false, Strict: true},
    	)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 12.6K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/config/strict/strict.go

    			break
    		}
    	}
    	if scheme == nil {
    		return errors.Errorf("unknown configuration %#v", gvk)
    	}
    
    	opt := json.SerializerOptions{Yaml: true, Pretty: false, Strict: true}
    	serializer := json.NewSerializerWithOptions(json.DefaultMetaFactory, scheme, scheme, opt)
    	_, _, err := serializer.Decode(bytes, &gvk, nil)
    	if err != nil {
    		return errors.Wrapf(err, "error unmarshaling configuration %#v", gvk)
    	}
    
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 17 17:37:41 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  4. istioctl/pkg/tag/generate.go

    	}
    
    	scheme := runtime.NewScheme()
    	codecFactory := serializer.NewCodecFactory(scheme)
    	deserializer := codecFactory.UniversalDeserializer()
    	serializer := json.NewSerializerWithOptions(
    		json.DefaultMetaFactory, nil, nil, json.SerializerOptions{
    			Yaml:   true,
    			Pretty: true,
    			Strict: true,
    		})
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 16 17:43:49 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go

    	}
    
    	for i, test := range testCases {
    		var s runtime.Serializer
    		if test.yaml {
    			s = json.NewSerializerWithOptions(json.DefaultMetaFactory, test.creater, test.typer, json.SerializerOptions{Yaml: test.yaml, Pretty: false, Strict: test.strict})
    		} else {
    			s = json.NewSerializerWithOptions(json.DefaultMetaFactory, test.creater, test.typer, json.SerializerOptions{Yaml: test.yaml, Pretty: test.pretty, Strict: test.strict})
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 04 15:55:02 UTC 2024
    - 40K bytes
    - Viewed (0)
  6. pkg/api/testing/unstructured_test.go

    				}
    
    				// Decoding into Unstructured requires that apiVersion and kind be
    				// serialized, so populate TypeMeta.
    				item.GetObjectKind().SetGroupVersionKind(gvk)
    
    				jsonSerializer := jsonserializer.NewSerializerWithOptions(jsonserializer.DefaultMetaFactory, legacyscheme.Scheme, legacyscheme.Scheme, jsonserializer.SerializerOptions{})
    				cborSerializer := cborserializer.NewSerializer(legacyscheme.Scheme, legacyscheme.Scheme)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  7. operator/pkg/object/objects.go

    	var objects K8sObjects
    
    	wrapErr := func(err error) error {
    		return fmt.Errorf("failed to parse YAML to a k8s object: %v", err)
    	}
    
    	s := json.NewSerializerWithOptions(json.DefaultMetaFactory, nil, nil, json.SerializerOptions{
    		Yaml:   true,
    		Pretty: true,
    		Strict: true,
    	})
    	for {
    		var obj unstructured.Unstructured
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 21 07:16:46 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go

    					Serializer:       json.NewSerializer(json.DefaultMetaFactory, creator, typer, false),
    					PrettySerializer: json.NewSerializer(json.DefaultMetaFactory, creator, typer, true),
    					StrictSerializer: json.NewSerializerWithOptions(json.DefaultMetaFactory, creator, typer, json.SerializerOptions{
    						Strict: true,
    					}),
    					StreamSerializer: &runtime.StreamSerializerInfo{
    						EncodesAsText: true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 52.9K bytes
    - Viewed (0)
  9. istioctl/pkg/multicluster/remote_secret.go

    )
    
    func init() {
    	scheme = runtime.NewScheme()
    	utilruntime.Must(v1.AddToScheme(scheme))
    	opt := json.SerializerOptions{
    		Yaml:   true,
    		Pretty: false,
    		Strict: false,
    	}
    	yamlSerializer := json.NewSerializerWithOptions(json.DefaultMetaFactory, scheme, scheme, opt)
    	codec = versioning.NewDefaultingCodecForScheme(
    		scheme,
    		yamlSerializer,
    		yamlSerializer,
    		v1.SchemeGroupVersion,
    		runtime.InternalGroupVersioner,
    	)
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 11 01:43:17 UTC 2023
    - 24K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go

    			})
    			if err != nil {
    				t.Fatal(err)
    			}
    			structuralSchemas[v] = structuralSchema
    			delegate := serializerjson.NewSerializerWithOptions(serializerjson.DefaultMetaFactory, unstructuredCreator{}, nil, serializerjson.SerializerOptions{Yaml: tc.yaml, Strict: tc.strictDecoding})
    			decoder := &schemaCoercingDecoder{
    				delegate: delegate,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 15:27:39 UTC 2023
    - 34.6K bytes
    - Viewed (0)
Back to top