From dfc0b25cfefd97cbe7c36fa514494fb97a71a4fe Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 15 Sep 2021 15:01:01 +0300 Subject: [PATCH] gomod: use nspcc-dev's fork of go-ordered-json Escape non-ASCII characters while JSON encoding. --- go.mod | 2 +- go.sum | 5 ++++- pkg/services/oracle/filter.go | 2 +- pkg/services/oracle/jsonpath/jsonpath.go | 2 +- pkg/services/oracle/jsonpath/jsonpath_test.go | 2 +- pkg/smartcontract/manifest/manifest.go | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 453b6681c..26b6d1790 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 github.com/mr-tron/base58 v1.2.0 github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac + github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02 github.com/nspcc-dev/neofs-api-go v1.27.1 github.com/nspcc-dev/rfc6979 v0.2.0 github.com/pierrec/lz4 v2.6.1+incompatible @@ -20,7 +21,6 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 github.com/twmb/murmur3 v1.1.5 github.com/urfave/cli v1.22.5 - github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 go.etcd.io/bbolt v1.3.6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.18.1 diff --git a/go.sum b/go.sum index 097245514..15deb0983 100644 --- a/go.sum +++ b/go.sum @@ -196,6 +196,8 @@ github.com/nspcc-dev/dbft v0.0.0-20200711144034-c526ccc6f570/go.mod h1:1FYQXSbb6 github.com/nspcc-dev/dbft v0.0.0-20210302103605-cc75991b7cfb/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac h1:nrewxmpns7GE0nO2DyGkrYfpZd/nMF7bN7DGvT8ljp0= github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= +github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02 h1:JgRx27vfGw5WV5QbaNDy0iy2WD1XJO964wwAapaYKLg= +github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg= @@ -363,8 +365,9 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/pkg/services/oracle/filter.go b/pkg/services/oracle/filter.go index 65eeed59e..f7b7f8816 100644 --- a/pkg/services/oracle/filter.go +++ b/pkg/services/oracle/filter.go @@ -5,10 +5,10 @@ import ( "errors" "unicode/utf8" + json "github.com/nspcc-dev/go-ordered-json" "github.com/nspcc-dev/neo-go/pkg/core/state" "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/services/oracle/jsonpath" - json "github.com/virtuald/go-ordered-json" ) func filter(value []byte, path string) ([]byte, error) { diff --git a/pkg/services/oracle/jsonpath/jsonpath.go b/pkg/services/oracle/jsonpath/jsonpath.go index 2fdaeb750..2afab962a 100644 --- a/pkg/services/oracle/jsonpath/jsonpath.go +++ b/pkg/services/oracle/jsonpath/jsonpath.go @@ -4,7 +4,7 @@ import ( "strconv" "strings" - json "github.com/virtuald/go-ordered-json" + json "github.com/nspcc-dev/go-ordered-json" ) type ( diff --git a/pkg/services/oracle/jsonpath/jsonpath_test.go b/pkg/services/oracle/jsonpath/jsonpath_test.go index f73501d89..7f69f2bbf 100644 --- a/pkg/services/oracle/jsonpath/jsonpath_test.go +++ b/pkg/services/oracle/jsonpath/jsonpath_test.go @@ -6,8 +6,8 @@ import ( "strconv" "testing" + json "github.com/nspcc-dev/go-ordered-json" "github.com/stretchr/testify/require" - json "github.com/virtuald/go-ordered-json" ) type pathTestCase struct { diff --git a/pkg/smartcontract/manifest/manifest.go b/pkg/smartcontract/manifest/manifest.go index 65582fa58..57fa3477e 100644 --- a/pkg/smartcontract/manifest/manifest.go +++ b/pkg/smartcontract/manifest/manifest.go @@ -6,9 +6,9 @@ import ( "errors" "math" + ojson "github.com/nspcc-dev/go-ordered-json" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - ojson "github.com/virtuald/go-ordered-json" ) const (