diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-10-12 22:35:21 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-10-12 22:35:21 +0200 |
| commit | 8f6f95650d876376664f1e5a04d9c4cf369468d8 (patch) | |
| tree | c8bdbd6e8272f4bb3cde393fd24b1f63b2fe04be | |
| parent | 3332671795b3a0b605c3b1d0d10c4085354e4c60 (diff) | |
| download | go-gg-8f6f95650d876376664f1e5a04d9c4cf369468d8.tar.gz | |
jsonmatch: make type Pointer a synonym for jsonmatch.Pointer
| -rw-r--r-- | CHANGELOG.md | 5 | ||||
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | jsonmatch/interface.go | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a009cc..93c5b34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,12 @@ SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net> SPDX-License-Identifier: Apache-2.0 --> -# v1.20.0 (TBD), TODO: reason for Go version increase +# v1.20.0 (TBD), TODO: double-check reason for Go version increase Changes: -- The minimum Go version was increased from 1.26 to 1.27 because... +- The minimum Go version was increased from 1.26 to 1.27 to facilitate the use of new APIs surrounding encoding/json/v2. +- jsonmatch: Pointer is now a synonym for jsontext.Pointer from the standard library. # v1.19.0 (2026-10-06) @@ -1,4 +1,4 @@ module go.xyrillian.de/gg -// TODO for 1.27: use sql.ConvertAssign for gg/option; deprecate gg/options and offer methods on Option instead; make jsonmatch.Pointer into an alias of jsontext.Pointer; replace json.{Unm,M}arshaler with json/v2.{Unm,M}arshaler{From,To}; add pathrouter.Context.Value[T]() +// TODO for 1.27: deprecate gg/options and offer methods on Option instead; replace json.{Unm,M}arshaler with json/v2.{Unm,M}arshaler{From,To}; add pathrouter.Context.Value[T]() go 1.27 diff --git a/jsonmatch/interface.go b/jsonmatch/interface.go index b0aa490..f54da50 100644 --- a/jsonmatch/interface.go +++ b/jsonmatch/interface.go @@ -132,6 +132,7 @@ package jsonmatch // import "go.xyrillian.de/gg/jsonmatch" import ( "encoding/json" + "encoding/json/jsontext" "errors" "fmt" ) @@ -252,8 +253,8 @@ func (d Diff) String() string { // Pointer is a JSON pointer (RFC 6901) that references a particular JSON value relative to the root of the encoded JSON payload that was given to DiffAgainst(). // It appears in type [Diff]. // -// This type is intended to become synonymous with encoding/json/jsontext.Pointer once that type is stabilized. -type Pointer string +// Deprecated: Use jsontext.Pointer directly. +type Pointer = jsontext.Pointer // CaptureField returns a capture slot that can be placed in an [Object] or [Array] instance to capture individual non-deterministic values during an assertion. // Please refer to the package documentation for details and usage examples. |
