Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 380 for marshaling (0.18 sec)

  1. istioctl/pkg/util/proto/messageslice.go

    	"istio.io/istio/pkg/util/protomarshal"
    )
    
    // MessageSlice allows us to marshal slices of protobuf messages like clusters/listeners/routes/endpoints correctly
    type MessageSlice []proto.Message
    
    // MarshalJSON handles marshaling of slices of proto messages
    func (pSlice MessageSlice) MarshalJSON() ([]byte, error) {
    	buffer := bytes.NewBufferString("[")
    	sliceLength := len(pSlice)
    	for index, msg := range pSlice {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 19 21:53:59 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  2. src/encoding/xml/typeinfo.go

    	xmlName = "XMLName"
    )
    
    var tinfoMap sync.Map // map[reflect.Type]*typeInfo
    
    var nameType = reflect.TypeFor[Name]()
    
    // getTypeInfo returns the typeInfo structure with details necessary
    // for marshaling and unmarshaling typ.
    func getTypeInfo(typ reflect.Type) (*typeInfo, error) {
    	if ti, ok := tinfoMap.Load(typ); ok {
    		return ti.(*typeInfo), nil
    	}
    
    	tinfo := &typeInfo{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:23:29 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  3. src/hash/hash.go

    //
    // Hash implementations in the standard library (e.g. [hash/crc32] and
    // [crypto/sha256]) implement the [encoding.BinaryMarshaler] and
    // [encoding.BinaryUnmarshaler] interfaces. Marshaling a hash implementation
    // allows its internal state to be saved and used for additional processing
    // later, without having to re-write the data previously written to the hash.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 19:15:34 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/fixedbugs_test.go

    		}
    		// The bug was in the following assignment. The return
    		// value of makeT() is not copied out of the args area of
    		// stack frame in a timely fashion. So when write barriers
    		// are enabled, the marshaling of the args for the write
    		// barrier call clobbers the result of makeT() before it is
    		// read by the write barrier code.
    		g = makeT()
    		sink = make([]byte, 1000) // force write barriers to eventually happen
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 18:07:35 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go

    	if err != nil {
    		t.Errorf("Error when marshaling object: %v", err)
    		return
    	}
    
    	unstr := make(map[string]interface{})
    	err = json.Unmarshal(data, &unstr)
    	if err != nil {
    		t.Errorf("Error when unmarshaling to unstructured: %v", err)
    		return
    	}
    
    	data, err = json.Marshal(unstr)
    	if err != nil {
    		t.Errorf("Error when marshaling unstructured: %v", err)
    		return
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 22.9K bytes
    - Viewed (0)
  6. common-protos/k8s.io/apimachinery/pkg/api/resource/generated.proto

    // Package-wide variables from generator "generated".
    option go_package = "k8s.io/apimachinery/pkg/api/resource";
    
    // Quantity is a fixed-point representation of a number.
    // It provides convenient marshaling/unmarshaling in JSON and YAML,
    // in addition to String() and AsInt64() accessors.
    //
    // The serialization format is:
    //
    // ```
    // <quantity>        ::= <signedNumber><suffix>
    //
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 18:43:24 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/generated.proto

    // Package-wide variables from generator "generated".
    option go_package = "k8s.io/apimachinery/pkg/api/resource";
    
    // Quantity is a fixed-point representation of a number.
    // It provides convenient marshaling/unmarshaling in JSON and YAML,
    // in addition to String() and AsInt64() accessors.
    //
    // The serialization format is:
    //
    // ```
    // <quantity>        ::= <signedNumber><suffix>
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/runtime/codec.go

    	result := map[string]string{
    		"name": "base64",
    	}
    	if e != nil {
    		result["encoder"] = string(e.Identifier())
    	}
    	identifier, err := json.Marshal(result)
    	if err != nil {
    		klog.Fatalf("Failed marshaling identifier for base64Serializer: %v", err)
    	}
    	return Identifier(identifier)
    }
    
    func (s base64Serializer) Encode(obj Object, stream io.Writer) error {
    	if co, ok := obj.(CacheableObject); ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 03:20:30 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  9. pkg/volume/util/resize_util.go

    	oldData, err := json.Marshal(oldPV)
    	if err != nil {
    		return oldPV, fmt.Errorf("unexpected error marshaling old PV %q with error : %v", oldPV.Name, err)
    	}
    
    	newData, err := json.Marshal(newPV)
    	if err != nil {
    		return oldPV, fmt.Errorf("unexpected error marshaling new PV %q with error : %v", newPV.Name, err)
    	}
    
    	patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, oldPV)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 17 19:30:35 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  10. pilot/pkg/model/extensions.go

    	if plugin.PluginConfig != nil && len(plugin.PluginConfig.Fields) > 0 {
    		cfgJSON, err := protomarshal.ToJSON(plugin.PluginConfig)
    		if err != nil {
    			log.Warnf("wasmplugin %v/%v discarded due to json marshaling error: %s", p.Namespace, p.Name, err)
    			return nil
    		}
    		cfg = protoconv.MessageToAny(&wrapperspb.StringValue{
    			Value: cfgJSON,
    		})
    	}
    
    	u, err := url.Parse(plugin.Url)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top