fix: need to marshall the actual encoded output

This commit is contained in:
Derrick Hammer 2024-01-18 10:03:17 -05:00
parent 4e78403658
commit a3af7485a6
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package metadata
import (
"encoding/base64"
"encoding/json"
"github.com/vmihailenco/msgpack/v5"
)
@ -26,8 +27,7 @@ func (b *Base64UrlBinary) UnmarshalJSON(data []byte) error {
return nil
}
func (b Base64UrlBinary) MarshalJSON() ([]byte, error) {
return []byte(base64.RawURLEncoding.EncodeToString(b)), nil
return json.Marshal([]byte(base64.RawURLEncoding.EncodeToString(b)))
}
func decodeIntMap(dec *msgpack.Decoder) (map[int]interface{}, error) {