Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 109 for unmarshalV1 (0.2 sec)

  1. src/encoding/json/decode.go

    // the JSON being the JSON literal null. In that case, Unmarshal sets
    // the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into
    // the value pointed at by the pointer. If the pointer is nil, Unmarshal
    // allocates a new value for it to point to.
    //
    // To unmarshal JSON into a value implementing [Unmarshaler],
    // Unmarshal calls that value's [Unmarshaler.UnmarshalJSON] method, including
    // when the input is a JSON null.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  2. src/crypto/tls/handshake_messages_test.go

    					// have parsable prefixes because the extension
    					// data is optional and the length of the
    					// Finished varies across versions.
    					for j := 0; j < len(marshaled); j++ {
    						if m.unmarshal(marshaled[0:j]) {
    							t.Errorf("#%d unmarshaled a prefix of length %d of %#v", i, j, m1)
    							break
    						}
    					}
    				}
    			}
    		})
    	}
    }
    
    func TestFuzz(t *testing.T) {
    	rand := rand.New(rand.NewSource(0))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. pkg/wasm/convert.go

    		if err := ec.GetTypedConfig().UnmarshalTo(wasmHTTPFilterConfig); err != nil {
    			return nil, nil, nil, fmt.Errorf("failed to unmarshal extension config resource into Wasm HTTP filter: %w", err)
    		}
    	case ec.GetTypedConfig().TypeUrl == model.WasmNetworkFilterType:
    		wasmNetwork = true
    		if err := ec.GetTypedConfig().UnmarshalTo(wasmNetworkFilterConfig); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. cmd/batch-expire.go

    type BatchJobExpirePurge struct {
    	line, col      int
    	RetainVersions int `yaml:"retainVersions" json:"retainVersions"`
    }
    
    var _ yaml.Unmarshaler = &BatchJobExpirePurge{}
    
    // UnmarshalYAML - BatchJobExpirePurge extends unmarshal to extract line, col
    func (p *BatchJobExpirePurge) UnmarshalYAML(val *yaml.Node) error {
    	type purge BatchJobExpirePurge
    	var tmp purge
    	err := val.Decode(&tmp)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 13:50:53 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  5. src/encoding/json/encode_test.go

    		t.Fatalf("Marshal:\n\tgot:  %s\n\twant: %s", got, want)
    	}
    	var back stringPointer
    	switch err = Unmarshal(b, &back); {
    	case err != nil:
    		t.Fatalf("Unmarshal error: %v", err)
    	case back.N == nil:
    		t.Fatalf("Unmarshal: back.N = nil, want non-nil")
    	case *back.N != 42:
    		t.Fatalf("Unmarshal: *back.N = %d, want 42", *back.N)
    	}
    }
    
    var encodeStringTests = []struct {
    	in  string
    	out string
    }{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go

    	}
    
    	for _, c := range cases {
    		var result MicroTimeHolder
    		if err := yaml.Unmarshal([]byte(c.input), &result); err != nil {
    			t.Errorf("Failed to unmarshal input '%v': %v", c.input, err)
    		}
    		if result.T != c.result {
    			t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result)
    		}
    	}
    }
    
    func TestMicroTimeMarshalJSON(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. pilot/pkg/networking/core/networkfilter_test.go

    	}
    	if config, ok := redisFilter.ConfigType.(*listener.Filter_TypedConfig); ok {
    		redisProxy := redis.RedisProxy{}
    		if err := config.TypedConfig.UnmarshalTo(&redisProxy); err != nil {
    			t.Errorf("unmarshal failed: %v", err)
    		}
    		if redisProxy.StatPrefix != "redis" {
    			t.Errorf("redis proxy statPrefix is %s", redisProxy.StatPrefix)
    		}
    		if !redisProxy.LatencyInMicros {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  8. pkg/test/framework/components/echo/config.go

    			configs[i].Namespace = namespace.Static(fmt.Sprint(ns))
    			delete(raw, "Namespace")
    		}
    	}
    
    	// unmarshal again after Namespace stripped is stripped, to avoid unmarshal error
    	modifiedBytes, err := json.Marshal(raw)
    	if err != nil {
    		return nil, err
    	}
    	if err := json.Unmarshal(modifiedBytes, &configs); err != nil {
    		return nil, nil
    	}
    
    	return configs, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 12:26:52 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  9. pkg/istio-agent/xds_proxy.go

    	}
    
    	if ia.localDNSServer != nil {
    		proxy.handlers[model.NameTableType] = func(resp *anypb.Any) error {
    			var nt dnsProto.NameTable
    			if err := resp.UnmarshalTo(&nt); err != nil {
    				log.Errorf("failed to unmarshal name table: %v", err)
    				return err
    			}
    			ia.localDNSServer.UpdateLookupTable(&nt)
    			return nil
    		}
    	}
    	if ia.cfg.EnableDynamicProxyConfig && ia.secretCache != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 27.9K 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