[#174] Use Marshal(JSON)/Unmarshal(JSON) methods for encoding/decoding

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-16 13:26:35 +03:00 committed by Alex Vanin
parent 3de8febe57
commit 58fcb35fb0
22 changed files with 91 additions and 140 deletions

View file

@ -112,7 +112,7 @@ func signBearerToken(cmd *cobra.Command, _ []string) error {
return fmt.Errorf("can't JSON encode bearer token: %w", err)
}
} else {
data, err = btok.ToV2().StableMarshal(nil)
data, err = btok.Marshal()
if err != nil {
return fmt.Errorf("can't binary encode bearer token: %w", err)
}
@ -151,7 +151,7 @@ func convertEACLTable(cmd *cobra.Command, _ []string) error {
return fmt.Errorf("can't JSON encode extended ACL table: %w", err)
}
} else {
data, err = table.ToV2().StableMarshal(nil)
data, err = table.Marshal()
if err != nil {
return fmt.Errorf("can't binary encode extended ACL table: %w", err)
}