Skip to content

Commit 835f2c6

Browse files
committed
upgrade github.com/go-json-experiment/json
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
1 parent 352674c commit 835f2c6

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

fieldpath/serialize.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func writePathKey(enc *jsontext.Encoder, pe PathElement) error {
5959

6060
type setContentsV1 Set
6161

62+
var _ json.MarshalerTo = (*setContentsV1)(nil)
63+
var _ json.UnmarshalerFrom = (*setContentsV1)(nil)
64+
6265
func (s *setContentsV1) MarshalJSONTo(enc *jsontext.Encoder) error {
6366
return s.emitContentsV1(false, enc)
6467
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module sigs.k8s.io/structured-merge-diff/v6
22

3-
go 1.24
3+
go 1.25
44

55
require (
6-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b
6+
github.com/go-json-experiment/json v0.0.0-20251027170946-4849db3c2f7e
77
github.com/google/go-cmp v0.5.9
88
go.yaml.in/yaml/v2 v2.4.2
99
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b h1:6Q4zRHXS/YLOl9Ng1b1OOOBWMidAQZR3Gel0UKPC/KU=
2-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
1+
github.com/go-json-experiment/json v0.0.0-20251027170946-4849db3c2f7e h1:Lf/gRkoycfOBPa42vU2bbgPurFong6zXeFtPoxholzU=
2+
github.com/go-json-experiment/json v0.0.0-20251027170946-4849db3c2f7e/go.mod h1:uNVvRXArCGbZ508SxYYTC5v1JWoz2voff5pm25jU1Ok=
33
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
44
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
55
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=

value/fields.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ type FastMarshalValue struct {
3737
Value *Value
3838
}
3939

40+
var _ json.MarshalerTo = FastMarshalValue{}
41+
4042
func (mv FastMarshalValue) MarshalJSONTo(enc *jsontext.Encoder) error {
4143
return valueMarshalJSONTo(enc, *mv.Value)
4244
}
@@ -93,6 +95,9 @@ func valueMarshalJSONTo(enc *jsontext.Encoder, v Value) error {
9395
// have a different name.
9496
type FieldList []Field
9597

98+
var _ json.MarshalerTo = (*FieldList)(nil)
99+
var _ json.UnmarshalerFrom = (*FieldList)(nil)
100+
96101
func (fl *FieldList) MarshalJSONTo(enc *jsontext.Encoder) error {
97102
enc.WriteToken(jsontext.BeginObject)
98103
for _, f := range *fl {

0 commit comments

Comments
 (0)