var TimePrecision … var MarshalSingleStringAsArray … type NumericDate … // NewNumericDate constructs a new *NumericDate from a standard library time.Time struct. // It will truncate the timestamp according to the precision specified in TimePrecision. func NewNumericDate(t time.Time) *NumericDate { … } // newNumericDateFromSeconds creates a new *NumericDate out of a float64 representing a // UNIX epoch with the float fraction representing non-integer seconds. func newNumericDateFromSeconds(f float64) *NumericDate { … } // MarshalJSON is an implementation of the json.RawMessage interface and serializes the UNIX epoch // represented in NumericDate to a byte array, using the precision specified in TimePrecision. func (date NumericDate) MarshalJSON() (b []byte, err error) { … } // UnmarshalJSON is an implementation of the json.RawMessage interface and deserializses a // NumericDate from a JSON representation, i.e. a json.Number. This number represents an UNIX epoch // with either integer or non-integer seconds. func (date *NumericDate) UnmarshalJSON(b []byte) (err error) { … } type ClaimStrings … func (s *ClaimStrings) UnmarshalJSON(data []byte) (err error) { … } func (s ClaimStrings) MarshalJSON() (b []byte, err error) { … }