func (j *Job) UnmarshalJSONPayload(v interface{}) error {
	err := json.Unmarshal(j.Payload, v)
	if err != nil {
		return &InvalidJobPayloadError{Err: err}
	}
	return nil
}
UnmarshalJSONPayload decodes the JSON payload into a variable.
package work
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"time"
	"github.com/google/uuid"
)
type Job struct {
	ID string `msgpack:"id"`
	CreatedAt time.Time `msgpack:"created_at"`
	UpdatedAt time.Time `msgpack:"updated_at"`
	EnqueuedAt time.Time `msgpack:"enqueued_at"`
	Payload []byte `msgpack:"payload"`
	Retries int64 `msgpack:"retries"`
	LastError string `msgpack:"last_error"`
}
type InvalidJobPayloadError struct {
	Err error
}
func (e *InvalidJobPayloadError) Error() string {
	return fmt.Sprintf("work: invalid job payload: %v", e.Err)
}
func (j *Job) UnmarshalPayload(v interface{}) error {
	err := unmarshal(bytes.NewReader(j.Payload), v)
	if err != nil {
		return &InvalidJobPayloadError{Err: err}
	}
	return nil
}