Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 364 for unmarshalV1 (0.15 sec)

  1. src/cmd/go/internal/modinfo/info.go

    // UnmarshalJSON accepts both {"Err":"text"} and "text",
    // so that the output of go mod download -json can still
    // be unmarshaled into a ModulePublic during -reuse processing.
    func (e *ModuleError) UnmarshalJSON(data []byte) error {
    	if len(data) > 0 && data[0] == '"' {
    		return json.Unmarshal(data, &e.Err)
    	}
    	return json.Unmarshal(data, (*moduleErrorNoMethods)(e))
    }
    
    func (m *ModulePublic) String() string {
    	s := m.Path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/json/json.go

    	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.
    // Numbers decoded into interface{} fields are converted to int64 or float64.
    func Unmarshal(data []byte, v interface{}) error {
    	return kjson.UnmarshalCaseSensitivePreserveInts(data, v)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 16:49:23 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  3. istioctl/pkg/version/version.go

    			switch resource.TypeUrl {
    			case "type.googleapis.com/envoy.config.core.v3.Node":
    				node := core.Node{}
    				err := resource.UnmarshalTo(&node)
    				if err != nil {
    					return nil, fmt.Errorf("could not unmarshal Node: %w", err)
    				}
    				meta, err := model.ParseMetadata(node.Metadata)
    				if err != nil || meta.ProxyConfig == nil {
    					// Skip non-sidecars (e.g. istioctl queries)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 15 01:18:49 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. internal/kms/dek_test.go

    			t.Fatalf("Test %d: failed to marshal DEK: %v", i, err)
    		}
    
    		var key DEK
    		if err = key.UnmarshalText(text); err != nil {
    			t.Fatalf("Test %d: failed to unmarshal DEK: %v", i, err)
    		}
    		if key.Plaintext != nil {
    			t.Fatalf("Test %d: unmarshaled DEK contains non-nil plaintext", i)
    		}
    		if !bytes.Equal(key.Ciphertext, test.Key.Ciphertext) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. src/math/big/intmarsh.go

    func (x *Int) MarshalJSON() ([]byte, error) {
    	if x == nil {
    		return []byte("null"), nil
    	}
    	return x.abs.itoa(x.neg, 10), nil
    }
    
    // UnmarshalJSON implements the [encoding/json.Unmarshaler] interface.
    func (z *Int) UnmarshalJSON(text []byte) error {
    	// Ignore null, like in the main JSON package.
    	if string(text) == "null" {
    		return nil
    	}
    	return z.UnmarshalText(text)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go

    		return hex.EncodeToString(data)
    	}
    	return diag
    }
    
    // unmarshal unmarshals CBOR data from the provided byte slice into a Go object. If the decoder is
    // configured to report strict errors, the first error return value may be a non-nil strict decoding
    // error. If the last error return value is non-nil, then the unmarshal failed entirely and the
    // state of the destination object should not be relied on.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 13 14:57:12 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  7. src/internal/chacha8rand/chacha8.go

    	}
    	return data
    }
    
    type errUnmarshalChaCha8 struct{}
    
    func (*errUnmarshalChaCha8) Error() string {
    	return "invalid ChaCha8 encoding"
    }
    
    // Unmarshal unmarshals the state from a byte slice.
    func Unmarshal(s *State, data []byte) error {
    	if len(data) != 6*8 || string(data[:8]) != "chacha8:" {
    		return new(errUnmarshalChaCha8)
    	}
    	used := byteorder.BeUint64(data[1*8:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. pilot/pkg/util/protoconv/protoconv.go

    	if err != nil {
    		return nil
    	}
    	return res
    }
    
    func UnmarshalAny[T any](a *anypb.Any) (*T, error) {
    	dst := any(new(T)).(proto.Message)
    	if err := a.UnmarshalTo(dst); err != nil {
    		return nil, fmt.Errorf("failed to unmarshal to %T: %v", dst, err)
    	}
    	return any(dst).(*T), nil
    }
    
    // https://github.com/planetscale/vtprotobuf#available-features
    type vtStrictMarshal interface {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 04:55:40 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. pkg/credentialprovider/config.go

    	if err = json.Unmarshal(contents, &cfg); err != nil {
    		return nil, errors.New("error occurred while trying to unmarshal json")
    	}
    	return
    }
    
    func readDockerConfigJSONFileFromBytes(contents []byte) (cfg DockerConfig, err error) {
    	var cfgJSON DockerConfigJSON
    	if err = json.Unmarshal(contents, &cfgJSON); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 19 15:11:57 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  10. pilot/pkg/xds/nds_test.go

    				Node: &core.Node{
    					Id:       ads.ID,
    					Metadata: tt.meta.ToStruct(),
    				},
    			})
    
    			nt := &dnsProto.NameTable{}
    			err := res.Resources[0].UnmarshalTo(nt)
    			if err != nil {
    				t.Fatal("Failed to unmarshal name table", err)
    				return
    			}
    			if len(nt.Table) == 0 {
    				t.Fatalf("expected more than 0 entries in name table")
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 27 16:59:05 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top