mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
vm: use hex for ByteArray JSON marshallization
It's way more convenient for different purposes.
This commit is contained in:
parent
5ce269c035
commit
64e20508e0
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package vm
|
|||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
@ -197,7 +198,7 @@ func (i *ByteArrayItem) Value() interface{} {
|
|||
|
||||
// MarshalJSON implements the json.Marshaler interface.
|
||||
func (i *ByteArrayItem) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(string(i.value))
|
||||
return json.Marshal(hex.EncodeToString(i.value))
|
||||
}
|
||||
|
||||
func (i *ByteArrayItem) String() string {
|
||||
|
|
Loading…
Reference in a new issue