Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for NewSerializerWithOptions (0.37 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. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. pkg/kube/inject/webhook.go

    )
    
    var (
    	runtimeScheme     = runtime.NewScheme()
    	codecs            = serializer.NewCodecFactory(runtimeScheme)
    	deserializer      = codecs.UniversalDeserializer()
    	jsonSerializer    = kjson.NewSerializerWithOptions(kjson.DefaultMetaFactory, runtimeScheme, runtimeScheme, kjson.SerializerOptions{})
    	URLParameterToEnv = map[string]string{
    		"cluster": "ISTIO_META_CLUSTER_ID",
    		"net":     "ISTIO_META_NETWORK",
    	}
    )
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:59:39 UTC 2024
    - 42.2K bytes
    - Viewed (0)
Back to top