Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for MarshalJSON (0.19 sec)

  1. cmd/xl-storage-format-v1.go

    }
    
    type checksumInfoJSON struct {
    	Name      string `json:"name"`
    	Algorithm string `json:"algorithm"`
    	Hash      string `json:"hash,omitempty"`
    }
    
    // MarshalJSON marshals the ChecksumInfo struct
    func (c ChecksumInfo) MarshalJSON() ([]byte, error) {
    	info := checksumInfoJSON{
    		Name:      fmt.Sprintf("part.%d", c.PartNumber),
    		Algorithm: c.Algorithm.String(),
    		Hash:      hex.EncodeToString(c.Hash),
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  2. internal/event/name.go

    		return err
    	}
    
    	eventName, err := ParseName(s)
    	if err != nil {
    		return err
    	}
    
    	*name = eventName
    	return nil
    }
    
    // MarshalJSON - encodes to JSON data.
    func (name Name) MarshalJSON() ([]byte, error) {
    	return json.Marshal(name.String())
    }
    
    // UnmarshalJSON - decodes JSON data.
    func (name *Name) UnmarshalJSON(data []byte) error {
    	var s string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  3. internal/jwt/parser.go

    }
    
    // Map returns underlying low-level map claims.
    func (c *MapClaims) Map() map[string]interface{} {
    	if c == nil {
    		return nil
    	}
    	return c.MapClaims
    }
    
    // MarshalJSON marshals the MapClaims struct
    func (c *MapClaims) MarshalJSON() ([]byte, error) {
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	return json.Marshal(c.MapClaims)
    }
    
    // ParseWithStandardClaims - parse the token string, valid methods.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  4. internal/s3select/sql/evaluate.go

    			}
    			dst[i] = *v
    		}
    		return FromArray(dst), nil
    	case simdjson.Object:
    		o := rval
    		elems, err := o.Parse(nil)
    		if err != nil {
    			return nil, err
    		}
    		bs, err := elems.MarshalJSON()
    		if err != nil {
    			return nil, err
    		}
    		return FromBytes(bs), nil
    	case []Value:
    		return FromArray(rval), nil
    	case nil:
    		return FromNull(), nil
    	case Missing:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 12K bytes
    - Viewed (0)
  5. docs/debugging/xl-meta/main.go

    					var header xlMetaV2VersionHeaderV2
    					if _, err := header.UnmarshalMsg(hdr, headerVer); err != nil {
    						return err
    					}
    					b, err := header.MarshalJSON()
    					if err != nil {
    						return err
    					}
    					var buf bytes.Buffer
    					if _, err := msgp.UnmarshalAsJSON(&buf, meta); err != nil {
    						return err
    					}
    					versions[idx] = version{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  6. logger/sql_test.go

    	"github.com/jinzhu/now"
    	"gorm.io/gorm/logger"
    )
    
    type JSON json.RawMessage
    
    func (j JSON) Value() (driver.Value, error) {
    	if len(j) == 0 {
    		return nil, nil
    	}
    	return json.RawMessage(j).MarshalJSON()
    }
    
    type ExampleStruct struct {
    	Name string
    	Val  string
    }
    
    func (s ExampleStruct) Value() (driver.Value, error) {
    	return json.Marshal(s)
    }
    
    func format(v []byte, escaper string) string {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. api/go1.21.txt

    pkg log/slog, method (*JSONHandler) WithGroup(string) Handler #56345
    pkg log/slog, method (Kind) String() string #56345
    pkg log/slog, method (Level) Level() Level #56345
    pkg log/slog, method (Level) MarshalJSON() ([]uint8, error) #56345
    pkg log/slog, method (Level) MarshalText() ([]uint8, error) #56345
    pkg log/slog, method (Level) String() string #56345
    pkg log/slog, method (*Level) UnmarshalJSON([]uint8) error #56345
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Aug 07 09:39:17 GMT 2023
    - 25.6K bytes
    - Viewed (0)
  8. api/except.txt

    pkg crypto/tls, type ConnectionState struct, TLSUnique //deprecated
    pkg debug/elf, const R_PPC64_SECTOFF_LO_DS = 61
    pkg encoding/json, method (*RawMessage) MarshalJSON() ([]uint8, error)
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu May 25 00:13:30 GMT 2023
    - 34.6K bytes
    - Viewed (0)
Back to top