forked from TrueCloudLab/neoneo-go
rpc: fix JSON marshalling for Invoke result
We should return a quote string as JSON value in case of recursive reference, otherwise json.Marshal returns an error.
This commit is contained in:
parent
acacac1b24
commit
27348973c3
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ func (r Invoke) MarshalJSON() ([]byte, error) {
|
||||||
for i := range arr {
|
for i := range arr {
|
||||||
data, err := stackitem.ToJSONWithTypes(r.Stack[i])
|
data, err := stackitem.ToJSONWithTypes(r.Stack[i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
st = []byte("error: recursive reference")
|
st = []byte(`"error: recursive reference"`)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
arr[i] = data
|
arr[i] = data
|
||||||
|
|
Loading…
Reference in a new issue