diff --git a/cmd/derper/depaware.txt b/cmd/derper/depaware.txt index cf4f36458..128b6b498 100644 --- a/cmd/derper/depaware.txt +++ b/cmd/derper/depaware.txt @@ -10,6 +10,12 @@ tailscale.com/cmd/derper dependencies: (generated by github.com/tailscale/depawa L github.com/coreos/go-iptables/iptables from tailscale.com/util/linuxfw W πŸ’£ github.com/dblohm7/wingoes from tailscale.com/util/winutil github.com/fxamacker/cbor/v2 from tailscale.com/tka + github.com/go-json-experiment/json from tailscale.com/types/views + github.com/go-json-experiment/json/internal from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonflags from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonopts from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonwire from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/jsontext from github.com/go-json-experiment/json+ github.com/golang/groupcache/lru from tailscale.com/net/dnscache L github.com/google/nftables from tailscale.com/util/linuxfw L πŸ’£ github.com/google/nftables/alignedbuff from github.com/google/nftables/xt diff --git a/cmd/stund/depaware.txt b/cmd/stund/depaware.txt index d1528c7ac..a35bbe84f 100644 --- a/cmd/stund/depaware.txt +++ b/cmd/stund/depaware.txt @@ -2,6 +2,12 @@ tailscale.com/cmd/stund dependencies: (generated by github.com/tailscale/depawar github.com/beorn7/perks/quantile from github.com/prometheus/client_golang/prometheus πŸ’£ github.com/cespare/xxhash/v2 from github.com/prometheus/client_golang/prometheus + github.com/go-json-experiment/json from tailscale.com/types/views + github.com/go-json-experiment/json/internal from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonflags from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonopts from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonwire from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/jsontext from github.com/go-json-experiment/json+ github.com/google/uuid from tailscale.com/util/fastuuid πŸ’£ github.com/prometheus/client_golang/prometheus from tailscale.com/tsweb/promvarz github.com/prometheus/client_golang/prometheus/internal from github.com/prometheus/client_golang/prometheus @@ -128,6 +134,7 @@ tailscale.com/cmd/stund dependencies: (generated by github.com/tailscale/depawar embed from crypto/internal/nistec+ encoding from encoding/json+ encoding/asn1 from crypto/x509+ + encoding/base32 from github.com/go-json-experiment/json encoding/base64 from encoding/json+ encoding/binary from compress/gzip+ encoding/hex from crypto/x509+ diff --git a/cmd/tailscale/depaware.txt b/cmd/tailscale/depaware.txt index 7b3d09af8..70aff43da 100644 --- a/cmd/tailscale/depaware.txt +++ b/cmd/tailscale/depaware.txt @@ -9,6 +9,12 @@ tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/dep W πŸ’£ github.com/dblohm7/wingoes from github.com/dblohm7/wingoes/pe+ W πŸ’£ github.com/dblohm7/wingoes/pe from tailscale.com/util/winutil/authenticode github.com/fxamacker/cbor/v2 from tailscale.com/tka + github.com/go-json-experiment/json from tailscale.com/types/views + github.com/go-json-experiment/json/internal from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonflags from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonopts from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/internal/jsonwire from github.com/go-json-experiment/json+ + github.com/go-json-experiment/json/jsontext from github.com/go-json-experiment/json+ github.com/golang/groupcache/lru from tailscale.com/net/dnscache L github.com/google/nftables from tailscale.com/util/linuxfw L πŸ’£ github.com/google/nftables/alignedbuff from github.com/google/nftables/xt diff --git a/cmd/tailscaled/depaware.txt b/cmd/tailscaled/depaware.txt index 6a8f53494..b5f3be1de 100644 --- a/cmd/tailscaled/depaware.txt +++ b/cmd/tailscaled/depaware.txt @@ -90,11 +90,12 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de πŸ’£ github.com/djherbis/times from tailscale.com/drive/driveimpl github.com/fxamacker/cbor/v2 from tailscale.com/tka github.com/gaissmai/bart from tailscale.com/net/tstun+ + github.com/go-json-experiment/json from tailscale.com/types/views github.com/go-json-experiment/json/internal from github.com/go-json-experiment/json/internal/jsonflags+ github.com/go-json-experiment/json/internal/jsonflags from github.com/go-json-experiment/json/internal/jsonopts+ - github.com/go-json-experiment/json/internal/jsonopts from github.com/go-json-experiment/json/jsontext - github.com/go-json-experiment/json/internal/jsonwire from github.com/go-json-experiment/json/jsontext - github.com/go-json-experiment/json/jsontext from tailscale.com/logtail + github.com/go-json-experiment/json/internal/jsonopts from github.com/go-json-experiment/json/jsontext+ + github.com/go-json-experiment/json/internal/jsonwire from github.com/go-json-experiment/json/jsontext+ + github.com/go-json-experiment/json/jsontext from tailscale.com/logtail+ W πŸ’£ github.com/go-ole/go-ole from github.com/go-ole/go-ole/oleutil+ W πŸ’£ github.com/go-ole/go-ole/oleutil from tailscale.com/wgengine/winnet L πŸ’£ github.com/godbus/dbus/v5 from tailscale.com/net/dns+ diff --git a/types/views/views.go b/types/views/views.go index 42758966f..fa0e45adb 100644 --- a/types/views/views.go +++ b/types/views/views.go @@ -13,6 +13,9 @@ import ( "maps" "slices" + jsonexp "github.com/go-json-experiment/json" + jsontext "github.com/go-json-experiment/json/jsontext" + "go4.org/mem" ) @@ -225,6 +228,13 @@ func (v Slice[T]) MarshalJSON() ([]byte, error) { return json.Marshal(v.ΠΆ) } +var _ jsonexp.MarshalerV2 = Slice[string]{nil} + +// MarshalJSON implements github.com/go-json-experiment/json.MarshalerV2. +func (v Slice[T]) MarshalJSONV2(e *jsontext.Encoder, opts jsonexp.Options) error { + return jsonexp.MarshalEncode(e, v.ΠΆ, opts) +} + // UnmarshalJSON implements json.Unmarshaler. func (v *Slice[T]) UnmarshalJSON(b []byte) error { return unmarshalSliceFromJSON(b, &v.ΠΆ)