- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 804 for unmarshalV1 (0.2 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go
if len(data) > 1 { first = data[0] } var nw JSONSchemaPropsOrStringArray if first == '{' { var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.Property); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 13 21:12:46 UTC 2021 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/roundtrip_test.go
if err != nil { t.Fatalf("unexpected error from Marshal of original: %v", err) } var iface interface{} if err := modePair.dec.Unmarshal(cborFromOriginal, &iface); err != nil { t.Fatalf("unexpected error from Unmarshal into %T: %v", &iface, err) } cborFromIface, err := modePair.enc.Marshal(iface) if err != nil { t.Fatalf("unexpected error from Marshal of iface: %v", err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 21:48:12 UTC 2024 - 7.1K bytes - Viewed (0) -
istioctl/pkg/util/configdump/listener.go
dal[i].ActiveState.Listener.TypeUrl = v3.ListenerType } sort.Slice(dal, func(i, j int) bool { l := &listener.Listener{} err = dal[i].ActiveState.Listener.UnmarshalTo(l) if err != nil { return false } name := l.Name err = dal[j].ActiveState.Listener.UnmarshalTo(l) if err != nil { return false } return name < l.Name }) if stripVersions { for i := range dal {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 2.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go
} for _, c := range cases { var result TimeHolder 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 TestTimeMarshalJSON(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 9.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal_test.go
} for _, c := range cases { var result JSONSchemaPropsOrBoolHolder if err := json.Unmarshal([]byte(c.input), &result); err != nil { t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) } if !reflect.DeepEqual(result, c.result) { t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 15 16:26:13 UTC 2019 - 7.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/json/json_test.go
{ var v *interface{} err := Unmarshal([]byte(`0`), v) goerr := gojson.Unmarshal([]byte(`0`), v) if err == nil || goerr == nil || err.Error() != goerr.Error() { t.Fatalf("expected error matching stdlib, got %v, %v", err, goerr) } else { t.Log(err) } } { var v *[]interface{} err := Unmarshal([]byte(`[]`), v) goerr := gojson.Unmarshal([]byte(`[]`), v)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 28 08:02:09 UTC 2022 - 9.3K bytes - Viewed (0) -
istioctl/pkg/util/configdump/route.go
drc[i].RouteConfig.TypeUrl = v3.RouteType } sort.Slice(drc, func(i, j int) bool { r := &route.RouteConfiguration{} err = drc[i].RouteConfig.UnmarshalTo(r) if err != nil { return false } name := r.Name err = drc[j].RouteConfig.UnmarshalTo(r) if err != nil { return false } return name < r.Name }) // In Istio 1.5, it is not enough just to sort the routes. The virtual hosts
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 3.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go
if len(data) > 1 { first = data[0] } var nw JSONSchemaPropsOrStringArray if first == '{' { var sch JSONSchemaProps if err := json.Unmarshal(data, &sch); err != nil { return err } nw.Schema = &sch } if first == '[' { if err := json.Unmarshal(data, &nw.Property); err != nil { return err } } *s = nw return nil } func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 13 21:12:46 UTC 2021 - 2.9K bytes - Viewed (0) -
src/encoding/json/number_test.go
"-0e+1", "-0e-34", } for _, test := range validTests { if !isValidNumber(test) { t.Errorf("%s should be valid", test) } var f float64 if err := Unmarshal([]byte(test), &f); err != nil { t.Errorf("%s should be valid but Unmarshal failed: %v", test, err) } if !jsonNumberRegexp.MatchString(test) { t.Errorf("%s should be valid but regexp does not match", test) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 24 05:40:28 UTC 2022 - 1.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/options_test.go
} patch := PatchOptions{} err = json.Unmarshal(b, &patch) if err != nil { t.Fatalf("failed to unmarshal UpdateOptions into PatchOptions: %v", err) } b, err = json.Marshal(patch) if err != nil { t.Fatalf("failed to marshal PatchOptions (%v): %v", err, patch) } got := UpdateOptions{} err = json.Unmarshal(b, &got) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 04 21:51:48 UTC 2019 - 1.6K bytes - Viewed (0)