Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 980 for u8marshal (0.19 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

    	for _, c := range cases {
    		input := IntOrStringHolder{c.input}
    		jsonMarshalled, err := json.Marshal(&input)
    		if err != nil {
    			t.Errorf("1: Failed to marshal input: '%v': %v", input, err)
    		}
    
    		var result IntOrStringHolder
    		err = yaml.Unmarshal(jsonMarshalled, &result)
    		if err != nil {
    			t.Errorf("2: Failed to unmarshal '%+v': %v", string(jsonMarshalled), err)
    		}
    
    		if !reflect.DeepEqual(input, result) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  2. pkg/kubelet/cm/cpumanager/state/checkpoint.go

    	return json.Unmarshal(blob, cp)
    }
    
    // UnmarshalCheckpoint tries to unmarshal passed bytes to checkpoint in v2 format
    func (cp *CPUManagerCheckpointV2) UnmarshalCheckpoint(blob []byte) error {
    	return json.Unmarshal(blob, cp)
    }
    
    // VerifyChecksum verifies that current checksum of checkpoint is valid in v1 format
    func (cp *CPUManagerCheckpointV1) VerifyChecksum() error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. src/crypto/elliptic/elliptic.go

    	return compressed
    }
    
    // unmarshaler is implemented by curves with their own constant-time Unmarshal.
    //
    // There isn't an equivalent interface for Marshal/MarshalCompressed because
    // that doesn't involve any mathematical operations, only FillBytes and Bit.
    type unmarshaler interface {
    	Unmarshal([]byte) (x, y *big.Int)
    	UnmarshalCompressed([]byte) (x, y *big.Int)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 9K bytes
    - Viewed (0)
  4. src/encoding/encoding.go

    // BinaryMarshaler is the interface implemented by an object that can
    // marshal itself into a binary form.
    //
    // MarshalBinary encodes the receiver into a binary form and returns the result.
    type BinaryMarshaler interface {
    	MarshalBinary() (data []byte, err error)
    }
    
    // BinaryUnmarshaler is the interface implemented by an object that can
    // unmarshal a binary representation of itself.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:43:37 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  5. src/crypto/x509/sec1.go

    	var privKey ecPrivateKey
    	if _, err := asn1.Unmarshal(der, &privKey); err != nil {
    		if _, err := asn1.Unmarshal(der, &pkcs8{}); err == nil {
    			return nil, errors.New("x509: failed to parse private key (use ParsePKCS8PrivateKey instead for this key format)")
    		}
    		if _, err := asn1.Unmarshal(der, &pkcs1PrivateKey{}); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  6. src/crypto/x509/pkcs1.go

    	var priv pkcs1PrivateKey
    	rest, err := asn1.Unmarshal(der, &priv)
    	if len(rest) > 0 {
    		return nil, asn1.SyntaxError{Msg: "trailing data"}
    	}
    	if err != nil {
    		if _, err := asn1.Unmarshal(der, &ecPrivateKey{}); err == nil {
    			return nil, errors.New("x509: failed to parse private key (use ParseECPrivateKey instead for this key format)")
    		}
    		if _, err := asn1.Unmarshal(der, &pkcs8{}); err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go

    	var expected map[string]interface{}
    	if err := yaml.Unmarshal([]byte(expectedEmbeddedResourceInstance), &expected); err != nil {
    		t.Fatal(err)
    	}
    	if !reflect.DeepEqual(expected, foo.Object) {
    		t.Errorf("unexpected diff: %s", cmp.Diff(expected, foo.Object))
    	}
    
    	t.Logf("Trying to create wrongly typed CR")
    	wronglyTyped := &unstructured.Unstructured{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 05:32:34 UTC 2023
    - 19K bytes
    - Viewed (0)
  8. src/encoding/json/example_marshaling_test.go

    	switch a {
    	default:
    		s = "unknown"
    	case Gopher:
    		s = "gopher"
    	case Zebra:
    		s = "zebra"
    	}
    
    	return json.Marshal(s)
    }
    
    func Example_customMarshalJSON() {
    	blob := `["gopher","armadillo","zebra","unknown","gopher","bee","gopher","zebra"]`
    	var zoo []Animal
    	if err := json.Unmarshal([]byte(blob), &zoo); err != nil {
    		log.Fatal(err)
    	}
    
    	census := make(map[Animal]int)
    	for _, animal := range zoo {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 20:18:52 UTC 2016
    - 1.2K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/apis/bootstraptoken/v1/utils_test.go

    	// If string input was specified, roundtrip like this: string -> (unmarshal) -> object -> (marshal) -> string
    	if len(input) > 0 {
    		if err := json.Unmarshal([]byte(input), newbts); err != nil {
    			return errors.Wrap(err, "expected no unmarshal error, got error")
    		}
    		if b, err = json.Marshal(newbts); err != nil {
    			return errors.Wrap(err, "expected no marshal error, got error")
    		}
    		if input != string(b) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 26 15:51:39 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  10. pkg/bootstrap/config.go

    		err := json.Unmarshal([]byte(val), &m)
    		if err != nil {
    			log.Warnf("Env variable %s [%s] failed json unmarshal: %v", key, val, err)
    		}
    	}, untypedMeta)
    
    	j, err := json.Marshal(untypedMeta)
    	if err != nil {
    		return nil, err
    	}
    
    	if err := json.Unmarshal(j, meta); err != nil {
    		return nil, err
    	}
    
    	meta = SetIstioVersion(meta)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:02:38 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top