Documentation
¶
Overview ¶
Package json provides JSON parsing utilities for Sidekiq job data.
Index ¶
- func DecompressBacktrace(data string) ([]string, error)
- func GetBool(m map[string]interface{}, key string) bool
- func GetFloat64(m map[string]interface{}, key string) float64
- func GetInt64(m map[string]interface{}, key string) int64
- func GetMap(m map[string]interface{}, key string) map[string]interface{}
- func GetSlice(m map[string]interface{}, key string) []interface{}
- func GetString(m map[string]interface{}, key string) string
- func GetStringSlice(m map[string]interface{}, key string) []string
- func GetTime(m map[string]interface{}, key string) time.Time
- func Marshal(v interface{}) (string, error)
- func Parse(data string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecompressBacktrace ¶
DecompressBacktrace decompresses a base64+zlib compressed backtrace string. Sidekiq compresses backtraces to save Redis memory.
func GetFloat64 ¶
GetFloat64 returns a float64 value from a map, or 0 if not found/wrong type.
func GetInt64 ¶
GetInt64 returns an int64 value from a map, or 0 if not found/wrong type. Handles both int64 and float64 (JSON numbers).
func GetString ¶
GetString returns a string value from a map, or empty string if not found/wrong type.
func GetStringSlice ¶
GetStringSlice returns a string slice from a map, or nil if not found/wrong type.
func GetTime ¶
GetTime returns a time.Time from a Unix timestamp float64, or zero time if not found.
Types ¶
This section is empty.