From 8f6f95650d876376664f1e5a04d9c4cf369468d8 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Mon, 12 Oct 2026 22:35:21 +0200 Subject: jsonmatch: make type Pointer a synonym for jsonmatch.Pointer --- CHANGELOG.md | 5 +++-- go.mod | 2 +- 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 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) diff --git a/go.mod b/go.mod index c4f28a9..9a73c0b 100644 --- a/go.mod +++ b/go.mod @@ -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. -- cgit v1.3.1