[go] encoding/json: compare json strings

39 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 7:36:24 PM6/4/23
to goph...@pubsubhelper.golang.org, Hiro Hamada, golang-co...@googlegroups.com

Gerrit Bot has uploaded this change for review.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 66db2a32058efdaa0408e020836177737cd5ca41
GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
2 files changed, 159 insertions(+), 0 deletions(-)

diff --git a/src/encoding/json/equal.go b/src/encoding/json/equal.go
new file mode 100644
index 0000000..0edc9df
--- /dev/null
+++ b/src/encoding/json/equal.go
@@ -0,0 +1,45 @@
+package json
+
+import (
+ "reflect"
+)
+
+// Eq Determine whether two JSON strings are equivalent
+// (with the same key value, in different order)
+func Eq(s1, s2 string) (bool, error) {
+ var i, i2 interface{}
+ err := Unmarshal([]byte(s1), &i)
+ if err != nil {
+ return false, err
+ }
+ err = Unmarshal([]byte(s2), &i2)
+ if err != nil {
+ return false, err
+ }
+ return reflect.DeepEqual(i, i2), nil
+}
+
+// Equal Determine whether two or more JSON strings are equivalent
+// (with the same key value and different order)
+func Equal(s1, s2 string, sN ...string) (bool, error) {
+ if len(sN) == 0 {
+ return Eq(s1, s2)
+ }
+ equal, err := Eq(s1, s2)
+ if err != nil {
+ return false, err
+ }
+ if !equal {
+ return false, nil
+ }
+ for _, js := range sN {
+ eq, err := Eq(s1, js)
+ if err != nil {
+ return false, err
+ }
+ if !eq {
+ return false, nil
+ }
+ }
+ return true, nil
+}
diff --git a/src/encoding/json/equal_test.go b/src/encoding/json/equal_test.go
new file mode 100644
index 0000000..1564651
--- /dev/null
+++ b/src/encoding/json/equal_test.go
@@ -0,0 +1,114 @@
+package json
+
+import (
+ "fmt"
+ "testing"
+)
+
+func TestEqual(t *testing.T) {
+ for _, tt := range getTests() {
+ eq, err := Equal(tt.leftJSON, tt.rightJSON)
+ if eq != tt.want {
+ t.Errorf("should eq \nleftJSON:%s \nrightJSON:%s", tt.leftJSON, tt.rightJSON)
+ }
+ if err != nil {
+ panic(err)
+ }
+ eq, err = Equal(tt.leftJSON, tt.errJSON)
+ if err != nil {
+ panic(err)
+ }
+ if eq {
+ t.Errorf("should !eq leftJSON:%s errJSON:%s", tt.leftJSON, tt.errJSON)
+ }
+ }
+}
+
+type testEqual struct {
+ leftJSON string
+ rightJSON string
+ want bool
+ errJSON string
+}
+
+func ExampleEqual() {
+ json1 := `{"author":"北洛","country":"china","age":22,"gopher":true}`
+ json2 := `{"author":"北洛","gopher":true,"country":"china","age":22}`
+ json3 := `{"age":22,"pageNum":1,"author":"北洛"}`
+ json4 := `{"age":22,"pageNum":1,"author":"洛北"}`
+ json5 := `{"age":22,"pageNum":1}`
+
+ fmt.Println(Equal(json1, json2)) //Returns true if the structure is equal and the values are equal
+ fmt.Println(Equal(json1, json2, json3)) //To return true, multiple values must be evaluated and all values must be equivalent
+ fmt.Println(Equal(json3, json4)) //Structure is equal but values are not equal, not equivalent
+ fmt.Println(Equal(json3, json5)) //Returns false due to unequal structures
+ //Output:
+ //true <nil>
+ //false <nil>
+ //false <nil>
+ //false <nil>
+
+}
+func getTests() []testEqual {
+ tests := []testEqual{
+ {
+ leftJSON: `{"A":[{"name":"tag"}]}`,
+ rightJSON: `{"A":[{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"A":[{"name":"tag"},{"name":"tag"}]}`,
+ }, {
+ leftJSON: `{"B":[{"name":"tag"},{"name":"tag"}]}`,
+ rightJSON: `{"B":[{"name":"tag"},{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"C":[{"name":"tag"},{"name":"tag"}]}`,
+ }, {
+ leftJSON: `{"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ rightJSON: `{"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"gopher":true}`,
+ }, {
+ leftJSON: `{"AP":[{"name":"tag"}]}`,
+ rightJSON: `{"AP":[{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"AP":[{"name":"北洛"}]}`,
+ }, {
+ leftJSON: `{"BP":[{"name":"tag"},{"name":"tag"}]}`,
+ rightJSON: `{"BP":[{"name":"tag"},{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"BP":[{"name":"tag"},{"name":"china"}]}`,
+ }, {
+ leftJSON: `{"AP":[{"name":"tag"}],"APP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ rightJSON: `{"APP":[{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"AP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"APP":[{"name":"tag"},{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"AP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ }, {
+ leftJSON: `{"AP":[{"name":"tag"}],"APP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ rightJSON: `{"B":[{"name":"tag"},{"name":"tag"}],"APP":[{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"AP":[{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"APP":[{"name":"tag1"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"AP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ },
+ {
+ leftJSON: `{"AP":[{"name":"tag"}],"APP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ rightJSON: `{"B":[{"name":"tag"},{"name":"tag"}],"APP":[{"name":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"AP":[{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ want: true,
+ errJSON: `{"APP":[{"name1":"tag"}],"CPP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"AP":[{"name":"tag"}],"B":[{"name":"tag"},{"name":"tag"}],"BP":[{"name":"tag"},{"name":"tag"}],"BPP":[{"name":"tag"},{"name":"tag"}],"C":[{"name":"tag"},{"name":"tag"},{"name":"tag"}],"CP":[{"name":"tag"},{"name":"tag"},{"name":"tag"}]}`,
+ }, {
+ leftJSON: `{"langAge":[{"arts":[{"profile":{"c":"clang"},"values":["1","2"]}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ rightJSON: `{"langAge":[{"arts":[{"values":["1","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ want: true,
+ errJSON: `{"langAge":[{"arts":[{"values":["11 there","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ }, {
+ leftJSON: `{"langAge":[{"arts":[{"values":["1","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"values":["Golang","Golang1"],"profile":{"Golang":"go"}}]}],"uid":1}`,
+ rightJSON: `{"langAge":[{"arts":[{"values":["1","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ want: true,
+ errJSON: `{"langAge":[{"arts_there":[{"values":["11 there","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ }, {
+ leftJSON: `{"langAge":[{"arts":[{"values":["1","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"values":["Golang","Golang1"],"profile":{"Golang":"go"}}]}],"uid":1}`,
+ rightJSON: `{"langAge":[{"arts":[{"values":["1","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ want: true,
+ errJSON: `{"langAge":[{"arts":[{"values":["1","2"],"profile":{"c":"clang"}}]},{"arts":[{"profile":{"c++":"cpp"},"values":["cpp1","cpp2","cpp3"]}]},{"arts":[{"profile":{"Golang":"go"},"values":["Golang","Golang1"]}]}],"uid":1}`,
+ },
+ }
+
+ return tests
+}

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Hiro Hamada <laci...@gmail.com>

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 7:41:48 PM6/4/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #2 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 66db2a32058efdaa0408e020836177737cd5ca41
GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
2 files changed, 159 insertions(+), 0 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 2
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Hiro Hamada <laci...@gmail.com>

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 8:02:12 PM6/4/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #3 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 538e2b7b7eb3d3567791d8b8952c3e132a43099c

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
2 files changed, 165 insertions(+), 0 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 3

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 9:22:17 PM6/4/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #4 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 0d0f45b4fa824cb66c2ce5b930ad0044b3f52592

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
3 files changed, 142 insertions(+), 0 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 4

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 10:03:01 PM6/4/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #5 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: f386652458db4a5f431332c953e92429935d118f

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
3 files changed, 220 insertions(+), 0 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 5

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 10:09:08 PM6/4/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #6 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: d919a3efaf20bbbbd404afc42671e8a806796fe7

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
3 files changed, 220 insertions(+), 0 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 6

Gerrit Bot (Gerrit)

unread,
Jun 4, 2023, 10:15:11 PM6/4/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #7 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: a62cc52d711f9c5485795a039a44f08752194362

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
3 files changed, 220 insertions(+), 0 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 7

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 12:07:35 AM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #8 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: cc0c4e119fba7353a203fb0fee06890a27db4809

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
4 files changed, 310 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 8

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 12:13:15 AM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #9 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: cc0c4e119fba7353a203fb0fee06890a27db4809
GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
4 files changed, 310 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 9

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 12:18:56 AM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #10 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: b52cca117f829ee1659657f2c00c320ebb4fcf50

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
4 files changed, 310 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 10

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 12:29:52 AM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #11 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 929a27f84bfb9119569e5e91d1e0ec2cfd8ef0bb

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
4 files changed, 310 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 11

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 12:43:30 AM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #12 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 61199285b18a7b23ff4df480f7e66d3d65f8c906

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
4 files changed, 288 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 12

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 12:49:10 AM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot uploaded patch set #13 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 76503ee41189cf9dfcd4b767df2a6c2db3f5630a

GitHub-Pull-Request: golang/go#60595
---
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
4 files changed, 288 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 13

Ian Lance Taylor (Gerrit)

unread,
Jun 5, 2023, 1:35:34 AM6/5/23
to Hiro Hamada, Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, triciu...@appspot.gserviceaccount.com, golang-co...@googlegroups.com

Patch set 13:Hold +1

View Change

1 comment:

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 13
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Comment-Date: Mon, 05 Jun 2023 05:35:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Hiro Hamada (Gerrit)

unread,
Jun 5, 2023, 9:39:40 AM6/5/23
to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, triciu...@appspot.gserviceaccount.com, golang-co...@googlegroups.com

Attention is currently required from: Ian Lance Taylor.

View Change

1 comment:

  • Patchset:

    • Patch Set #13:

      Thanks. New API like this has to go through the proposal process, as described at https://go. […]

      Sure I will work on it.

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 13
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-CC: Hiro Hamada <laci...@gmail.com>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-Comment-Date: Mon, 05 Jun 2023 13:39:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 1:51:47 PM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Ian Lance Taylor.

Gerrit Bot uploaded patch set #14 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 31637fc86bf542da818f367cf8350abc8758a103
GitHub-Pull-Request: golang/go#60595
---
M src/encoding/json/bench_test.go

A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
5 files changed, 322 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 14

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 2:54:00 PM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Ian Lance Taylor.

Gerrit Bot uploaded patch set #15 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: c4b27a7fc0f62f61fd3bf2efc4f0d4ad9dd2006e

GitHub-Pull-Request: golang/go#60595
---
M src/encoding/json/bench_test.go
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
5 files changed, 332 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 15

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 3:31:22 PM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Ian Lance Taylor.

Gerrit Bot uploaded patch set #16 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 95d52d3e7d3c38c8eee2d6d0c30373b3fa3e5994

GitHub-Pull-Request: golang/go#60595
---
M src/encoding/json/bench_test.go
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
5 files changed, 332 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 16

Gerrit Bot (Gerrit)

unread,
Jun 5, 2023, 4:01:51 PM6/5/23
to Hiro Hamada, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Ian Lance Taylor.

Gerrit Bot uploaded patch set #17 to this change.

View Change

encoding/json: compare json strings

Checks equality of json strings.

Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
GitHub-Last-Rev: 1b1376965a44352742d6b6fd8bd40a2497201689

GitHub-Pull-Request: golang/go#60595
---
M src/encoding/json/bench_test.go
A src/encoding/json/equal.go
A src/encoding/json/equal_test.go
M src/encoding/json/example_test.go
M src/encoding/json/fuzz_test.go
5 files changed, 347 insertions(+), 4 deletions(-)

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I113236102f6fb645e15cf91cf623bb627354a5eb
Gerrit-Change-Number: 500735
Gerrit-PatchSet: 17

Gopher Robot (Gerrit)

unread,
Jul 1, 2023, 11:44:51 PM7/1/23
to Hiro Hamada, Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, triciu...@appspot.gserviceaccount.com, golang-co...@googlegroups.com

Gopher Robot abandoned this change.

View Change

Abandoned GitHub PR golang/go#60595 has been closed.

To view, visit change 500735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: abandon
Reply all
Reply to author
Forward
0 new messages