Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 476 for u8marshal (0.19 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go

    		var sch JSONSchemaProps
    		if err := json.Unmarshal(data, &sch); err != nil {
    			return err
    		}
    		nw.Schema = &sch
    	}
    	if first == '[' {
    		if err := json.Unmarshal(data, &nw.Property); err != nil {
    			return err
    		}
    	}
    	*s = nw
    	return nil
    }
    
    func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) {
    	if len(s.JSONSchemas) > 0 {
    		return json.Marshal(s.JSONSchemas)
    	}
    	return json.Marshal(s.Schema)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 13 21:12:46 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go

    		var sch JSONSchemaProps
    		if err := json.Unmarshal(data, &sch); err != nil {
    			return err
    		}
    		nw.Schema = &sch
    	}
    	if first == '[' {
    		if err := json.Unmarshal(data, &nw.Property); err != nil {
    			return err
    		}
    	}
    	*s = nw
    	return nil
    }
    
    func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) {
    	if len(s.JSONSchemas) > 0 {
    		return json.Marshal(s.JSONSchemas)
    	}
    	return json.Marshal(s.Schema)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 13 21:12:46 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go

    		}
    
    		// Classify the callee (without allocating memory).
    		argidx := -1
    
    		recv := fn.Type().(*types.Signature).Recv()
    		if fn.Name() == "Unmarshal" && recv == nil {
    			// "encoding/json".Unmarshal
    			// "encoding/xml".Unmarshal
    			// "encoding/asn1".Unmarshal
    			switch fn.Pkg().Path() {
    			case "encoding/json", "encoding/xml", "encoding/asn1":
    				argidx = 1 // func([]byte, interface{})
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. src/cmd/vet/testdata/unmarshal/unmarshal.go

    // license that can be found in the LICENSE file.
    
    // This file contains tests for the unmarshal checker.
    
    package unmarshal
    
    import "encoding/json"
    
    func _() {
    	type t struct {
    		a int
    	}
    	var v t
    
    	json.Unmarshal([]byte{}, v) // ERROR "call of Unmarshal passes non-pointer as second argument"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 20 15:46:42 UTC 2019
    - 406 bytes
    - Viewed (0)
  5. pkg/util/protomarshal/protomarshal.go

    	strictUnmarshaler = jsonpb.Unmarshaler{}
    )
    
    func Unmarshal(b []byte, m proto.Message) error {
    	return strictUnmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m))
    }
    
    func UnmarshalString(s string, m proto.Message) error {
    	return Unmarshal([]byte(s), m)
    }
    
    func UnmarshalAllowUnknown(b []byte, m proto.Message) error {
    	return unmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m))
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 12 10:02:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/extension_test.go

    		new1 := test{}
    		new2 := test{}
    		data, err := json.Marshal(tc.orig)
    		if err != nil {
    			t.Errorf("1st marshal error: %v", err)
    		}
    		if err = json.Unmarshal(data, &new1); err != nil {
    			t.Errorf("1st unmarshal error: %v", err)
    		}
    		newData, err := json.Marshal(new1)
    		if err != nil {
    			t.Errorf("2st marshal error: %v", err)
    		}
    		if err = json.Unmarshal(newData, &new2); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 08 22:36:37 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/marshal.go

    	if !ok {
    		return []byte{}, errors.Errorf("unsupported media type %q", mediaType)
    	}
    
    	encoder := codecs.EncoderForVersion(info.Serializer, gv)
    	return runtime.Encode(encoder, obj)
    }
    
    // UniversalUnmarshal unmarshals YAML or JSON into a runtime.Object using the universal deserializer.
    func UniversalUnmarshal(buffer []byte) (runtime.Object, error) {
    	codecs := clientsetscheme.Codecs
    	decoder := codecs.UniversalDeserializer()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/json/json.go

    	return json.NewEncoder(w)
    }
    
    // Marshal delegates to json.Marshal
    // It is only here so this package can be a drop-in for common encoding/json uses
    func Marshal(v interface{}) ([]byte, error) {
    	return json.Marshal(v)
    }
    
    // limit recursive depth to prevent stack overflow errors
    const maxDepth = 10000
    
    // Unmarshal unmarshals the given data.
    // Object keys are case-sensitive.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 16:49:23 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  9. src/internal/chacha8rand/chacha8.go

    				break
    			}
    			s.Refill()
    		}
    	}
    	s.Init64(seed)
    }
    
    // Marshal marshals the state into a byte slice.
    // Marshal and Unmarshal are functions, not methods,
    // so that they will not be linked into the runtime
    // when it uses the State struct, since the runtime
    // does not need these.
    func Marshal(s *State) []byte {
    	data := make([]byte, 6*8)
    	copy(data, "chacha8:")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. operator/pkg/util/yaml.go

    	ao, bo := make(map[string]any), make(map[string]any)
    	if err := yaml.Unmarshal([]byte(a), &ao); err != nil {
    		return err.Error()
    	}
    	if err := yaml.Unmarshal([]byte(b), &bo); err != nil {
    		return err.Error()
    	}
    
    	ay, err := yaml.Marshal(ao)
    	if err != nil {
    		return err.Error()
    	}
    	by, err := yaml.Marshal(bo)
    	if err != nil {
    		return err.Error()
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Jan 14 02:41:27 UTC 2023
    - 7.2K bytes
    - Viewed (0)
Back to top