Пример #1
0
// MarshalJSON implements json.Marshaler for payload.
func (p *payload) MarshalJSON() ([]byte, error) {
	b, err := json.Marshal(p.v)
	if err != nil {
		return nil, err
	}
	return jose.EncodeEscape(b), nil
}
Пример #2
0
// MarshalJSON implements json.Marshaler for a signature.
func (s Signature) MarshalJSON() ([]byte, error) {
	return jose.EncodeEscape(s), nil
}