Skip to content

Commit c2a122c

Browse files
committed
update github.com/go-json-experiment/json
1 parent e81a63a commit c2a122c

39 files changed

Lines changed: 1254 additions & 860 deletions

duration.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import (
88
)
99

1010
// DurationMarshalIntSeconds is a custom marshaler for time.Duration, marshaling them as integers representing seconds.
11-
func DurationMarshalIntSeconds(enc *jsontext.Encoder, d time.Duration, opts json.Options) error {
11+
func DurationMarshalIntSeconds(enc *jsontext.Encoder, d time.Duration) error {
1212
return enc.WriteToken(jsontext.Int(int64(d / time.Second)))
1313
}
1414

1515
// DurationUnmarshalIntSeconds is a custom unmarshaler for time.Duration, unmarshaling them from integers and assuming they represent seconds.
16-
func DurationUnmarshalIntSeconds(dec *jsontext.Decoder, d *time.Duration, opts json.Options) error {
16+
func DurationUnmarshalIntSeconds(dec *jsontext.Decoder, d *time.Duration) error {
1717
var seconds int64
18-
if err := json.UnmarshalDecode(dec, &seconds, opts); err != nil {
18+
if err := json.UnmarshalDecode(dec, &seconds); err != nil {
1919
return err
2020
}
2121

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module github.com/MarkRosemaker/jsonutil
22

3-
go 1.23.2
3+
go 1.24
44

5-
require github.com/go-json-experiment/json v0.0.0-20250113184934-d8c9bc4f8854
5+
toolchain go1.24.5
6+
7+
require github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github.com/go-json-experiment/json v0.0.0-20250113184934-d8c9bc4f8854 h1:xIKlfS6x7Jti9Xyga3iYMVusEWtUR2hXbeAf7Q21vho=
2-
github.com/go-json-experiment/json v0.0.0-20250113184934-d8c9bc4f8854/go.mod h1:BWmvoE1Xia34f3l/ibJweyhrT+aROb/FQ6d+37F0e2s=
1+
github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2 h1:iizUGZ9pEquQS5jTGkh4AqeeHCMbfbjeb0zMt0aEFzs=
2+
github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=

url.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ import (
44
"fmt"
55
"net/url"
66

7-
"github.com/go-json-experiment/json"
87
"github.com/go-json-experiment/json/jsontext"
98
)
109

1110
// URLMarshal is a custom marshaler for URL values, marshaling them as strings.
12-
func URLMarshal(enc *jsontext.Encoder, u url.URL, opts json.Options) error {
11+
func URLMarshal(enc *jsontext.Encoder, u url.URL) error {
1312
return enc.WriteToken(jsontext.String(u.String()))
1413
}
1514

1615
// URLUnmarshal is a custom unmarshaler for URL values, unmarshaling them from strings.
17-
func URLUnmarshal(dec *jsontext.Decoder, u *url.URL, opts json.Options) error {
16+
func URLUnmarshal(dec *jsontext.Decoder, u *url.URL) error {
1817
tkn, err := dec.ReadToken()
1918
if err != nil {
2019
return err

vendor/github.com/go-json-experiment/json/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/go-json-experiment/json/arshal.go

Lines changed: 81 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/go-json-experiment/json/arshal_any.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)