Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 319 for unmarshaling (0.43 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go

    // Timestamp returns the Time as a new Timestamp value.
    func (m *MicroTime) ProtoMicroTime() *Timestamp {
    	if m == nil {
    		return &Timestamp{}
    	}
    
    	// truncate precision to microseconds to match JSON marshaling/unmarshaling
    	truncatedNanoseconds := time.Duration(m.Time.Nanosecond()).Truncate(time.Microsecond)
    	return &Timestamp{
    		Seconds: m.Time.Unix(),
    		Nanos:   int32(truncatedNanoseconds),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 02 08:21:04 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  2. src/math/big/ratmarsh_test.go

    			var tx Rat
    			tx.SetString(num + "/" + denom)
    			b, err := json.Marshal(&tx)
    			if err != nil {
    				t.Errorf("marshaling of %s failed: %s", &tx, err)
    				continue
    			}
    			var rx Rat
    			if err := json.Unmarshal(b, &rx); err != nil {
    				t.Errorf("unmarshaling of %s failed: %s", &tx, err)
    				continue
    			}
    			if rx.Cmp(&tx) != 0 {
    				t.Errorf("JSON encoding of %s failed: got %s want %s", &tx, &rx, &tx)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 11 20:20:16 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  3. 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)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher_test.go

    			}
    
    			var p map[string]interface{}
    			if err := json.Unmarshal([]byte(actual), &p); err != nil {
    				t.Errorf("unexpected error unmarshaling patch annotation: %v", err)
    			}
    			if p["configuration"] != tc.config {
    				t.Errorf("unmarshaled configuration doesn't match, want: %s, got: %v", tc.config, p["configuration"])
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    // Package direct provides functions for marshaling and unmarshaling between arbitrary Go values and
    // CBOR data, with behavior that is compatible with that of the CBOR serializer. In particular,
    // types that implement cbor.Marshaler and cbor.Unmarshaler should use these functions.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 15 15:31:10 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. 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)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta/algorithm.go

    	// cannot be successfully decoded to the corresponding ObjectMeta field.
    	// This only applies to fields that are recognized as part of the schema,
    	// but of an invalid type (i.e. cause an error when unmarshaling, rather
    	// than being dropped or causing a strictErr).
    	DropInvalidFields bool
    	// ReturnUnknownFieldPaths will return the paths to fields that are not
    	// recognized as part of the schema.
    	ReturnUnknownFieldPaths bool
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 18 14:55:12 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go

    		t.Fatalf("unexpected error unmarshaling yaml: %v", err)
    	}
    	if _, ok := sliceWithInteger[0].(int64); !ok {
    		t.Fatalf(`Expected number in slice to be int64 but got "%T"`, sliceWithInteger[0])
    	}
    
    	integerBytes := []byte(`1`)
    	var integer interface{}
    	if err := Unmarshal(integerBytes, &integer); err != nil {
    		t.Fatalf("unexpected error unmarshaling yaml: %v", err)
    	}
    	if _, ok := integer.(int64); !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 07:29:34 UTC 2023
    - 12.4K bytes
    - Viewed (0)
  9. 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)
  10. staging/src/k8s.io/apimachinery/pkg/util/mergepatch/util.go

    // supports JSON merge patch semantics.
    //
    // NOTE: Numbers with different types (e.g. int(0) vs int64(0)) will be detected as conflicts.
    // Make sure the unmarshaling of left and right are consistent (e.g. use the same library).
    func HasConflicts(left, right interface{}) (bool, error) {
    	switch typedLeft := left.(type) {
    	case map[string]interface{}:
    		switch typedRight := right.(type) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 3.6K bytes
    - Viewed (0)
Back to top