- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 198 for Unmarshal (0.09 sec)
-
soft_delete.go
} return n.Time, nil } func (n DeletedAt) MarshalJSON() ([]byte, error) { if n.Valid { return json.Marshal(n.Time) } return json.Marshal(nil) } func (n *DeletedAt) UnmarshalJSON(b []byte) error { if string(b) == "null" { n.Valid = false return nil } err := json.Unmarshal(b, &n.Time) if err == nil { n.Valid = true } return err }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
cmd/config.go
data, err = decryptData(data, configFile) if err != nil { lookupConfigs(srvCfg, objAPI) return nil, err } } json := jsoniter.ConfigCompatibleWithStandardLibrary if err := json.Unmarshal(data, &srvCfg); err != nil { return nil, err } // Add any missing entries return srvCfg.Merge(), nil } // ConfigSys - config system. type ConfigSys struct{}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 23 10:07:06 UTC 2023 - 6K bytes - Viewed (0) -
internal/config/policy/opa/config.go
} // UnmarshalJSON - decodes JSON data. func (a *Args) UnmarshalJSON(data []byte) error { // subtype to avoid recursive call to UnmarshalJSON() type subArgs Args var so subArgs if err := json.Unmarshal(data, &so); err != nil { return err } oa := Args(so) if oa.URL == nil || oa.URL.String() == "" { *a = oa return nil } *a = oa return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 10 20:16:44 UTC 2024 - 5.3K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/configdump_test.go
) func TestConfigWriter_Prime(t *testing.T) { tests := []struct { name string wantConfigs int inputFile string wantErr bool }{ { name: "errors if unable to unmarshal bytes", inputFile: "", wantConfigs: 0, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cw := &ConfigWriter{} cd, _ := os.ReadFile(tt.inputFile)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Jan 03 23:08:06 UTC 2024 - 3.5K bytes - Viewed (0) -
internal/grid/types.go
} } } return } // JSONPool is a pool for JSON objects that unmarshal into T. type JSONPool[T any] struct { pool sync.Pool emptySz int } // NewJSONPool returns a new JSONPool. func NewJSONPool[T any]() *JSONPool[T] { var t T sz := 128 if b, err := json.Marshal(t); err != nil { sz = len(b) } return &JSONPool[T]{ pool: sync.Pool{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 15.5K bytes - Viewed (0) -
cmd/data-usage.go
} return DataUsageInfo{}, toObjectErr(err, minioMetaBucket, dataUsageObjNamePath) } } var dataUsageInfo DataUsageInfo json := jsoniter.ConfigCompatibleWithStandardLibrary if err = json.Unmarshal(buf, &dataUsageInfo); err != nil { return DataUsageInfo{}, err } // For forward compatibility reasons, we need to add this code. if len(dataUsageInfo.BucketsUsage) == 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 5.6K bytes - Viewed (0) -
cmd/bucket-quota.go
return BucketUsageInfo{} } // parseBucketQuota parses BucketQuota from json func parseBucketQuota(bucket string, data []byte) (quotaCfg *madmin.BucketQuota, err error) { quotaCfg = &madmin.BucketQuota{} if err = json.Unmarshal(data, quotaCfg); err != nil { return quotaCfg, err } if !quotaCfg.IsValid() { if quotaCfg.Type == "fifo" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 00:34:56 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/crypto/sse-kms.go
b, err := base64.StdEncoding.DecodeString(context[0]) if err != nil { return "", nil, err } json := jsoniter.ConfigCompatibleWithStandardLibrary if err := json.Unmarshal(b, &ctx); err != nil { return "", nil, err } } keyID := h.Get(xhttp.AmzServerSideEncryptionKmsID) spaces := strings.HasPrefix(keyID, " ") || strings.HasSuffix(keyID, " ") if spaces {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 8.5K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/configdump_test.go
) func TestConfigWriter_Prime(t *testing.T) { tests := []struct { name string wantConfigs int inputFile string wantErr bool }{ { name: "errors if unable to unmarshal bytes", inputFile: "", wantConfigs: 0, wantErr: true, }, { name: "loads valid ztunnel config_dump", inputFile: "testdata/dump.json", wantConfigs: 27,
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Jun 06 20:18:34 UTC 2024 - 3.6K bytes - Viewed (0) -
internal/jwt/parser.go
// StandardClaims are basically standard claims with "accessKey" type StandardClaims struct { AccessKey string `json:"accessKey,omitempty"` jwtgo.StandardClaims } // UnmarshalJSON provides custom JSON unmarshal. // This is mainly implemented for speed. func (c *StandardClaims) UnmarshalJSON(b []byte) (err error) { return jsonparser.ObjectEach(b, func(key []byte, value []byte, dataType jsonparser.ValueType, _ int) error {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 14.1K bytes - Viewed (0)