From d166a0b03e88e3ffe17a5bee4e5405b5091573c6 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Tue, 10 Jun 2025 13:55:09 -0700 Subject: [PATCH] encoding/json/jsontext, encoding/json/v2: document experimental nature Change-Id: I7b2c391749e0113e006f37b2ac1ebfe3ee0a4e0e Reviewed-on: https://go-review.googlesource.com/c/go/+/680715 TryBot-Bypass: Damien Neil Reviewed-by: Cherry Mui Reviewed-by: Joseph Tsai Auto-Submit: Damien Neil --- src/encoding/json/jsontext/doc.go | 5 +++++ src/encoding/json/v2/doc.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/encoding/json/jsontext/doc.go b/src/encoding/json/jsontext/doc.go index 755305151f..8a21ba70bd 100644 --- a/src/encoding/json/jsontext/doc.go +++ b/src/encoding/json/jsontext/doc.go @@ -10,6 +10,11 @@ // primitive data types such as booleans, strings, and numbers, // in addition to structured data types such as objects and arrays. // +// This package (encoding/json/jsontxt) is experimental, +// and not subject to the Go 1 compatibility promise. +// It only exists when building with the GOEXPERIMENT=jsonv2 environment variable set. +// Most users should use [encoding/json]. +// // The [Encoder] and [Decoder] types are used to encode or decode // a stream of JSON tokens or values. // diff --git a/src/encoding/json/v2/doc.go b/src/encoding/json/v2/doc.go index 8dd0b138f5..203139754c 100644 --- a/src/encoding/json/v2/doc.go +++ b/src/encoding/json/v2/doc.go @@ -9,6 +9,11 @@ // primitive data types such as booleans, strings, and numbers, // in addition to structured data types such as objects and arrays. // +// This package (encoding/json/v2) is experimental, +// and not subject to the Go 1 compatibility promise. +// It only exists when building with the GOEXPERIMENT=jsonv2 environment variable set. +// Most users should use [encoding/json]. +// // [Marshal] and [Unmarshal] encode and decode Go values // to/from JSON text contained within a []byte. // [MarshalWrite] and [UnmarshalRead] operate on JSON text -- 2.50.0