From 6248c1ceca7aa6ed669dac1c6e320a3c21610389 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Mon, 14 Jul 2025 14:41:16 -0700 Subject: [PATCH] all: use "github.com/go-json-experiment/json/v1" over "encoding/json" DO NOT SUBMIT: experiment to check how much breaks. Signed-off-by: Joe Tsai --- client/local/local.go | 2 +- client/tailscale/acl.go | 2 +- client/tailscale/devices.go | 2 +- client/tailscale/dns.go | 2 +- client/tailscale/keys.go | 2 +- client/tailscale/routes.go | 2 +- client/tailscale/tailscale.go | 2 +- client/web/web.go | 2 +- client/web/web_test.go | 2 +- clientupdate/clientupdate.go | 2 +- cmd/connector-gen/aws.go | 2 +- cmd/connector-gen/github.go | 2 +- cmd/containerboot/egressservices.go | 2 +- cmd/containerboot/ingressservices.go | 2 +- cmd/containerboot/kube.go | 2 +- cmd/containerboot/main_test.go | 2 +- cmd/containerboot/serve.go | 2 +- cmd/derper/bootstrap_dns.go | 2 +- cmd/derper/bootstrap_dns_test.go | 2 +- cmd/derper/cert.go | 2 +- cmd/derper/depaware.txt | 1 + cmd/derper/derper.go | 2 +- cmd/gitops-pusher/cache.go | 2 +- cmd/gitops-pusher/gitops-pusher.go | 2 +- cmd/gitops-pusher/gitops-pusher_test.go | 2 +- cmd/hello/hello.go | 2 +- cmd/k8s-nameserver/main.go | 2 +- cmd/k8s-operator/depaware.txt | 1 + cmd/k8s-operator/dnsrecords.go | 2 +- cmd/k8s-operator/dnsrecords_test.go | 2 +- cmd/k8s-operator/e2e/proxy_test.go | 2 +- cmd/k8s-operator/egress-eps.go | 2 +- cmd/k8s-operator/egress-eps_test.go | 2 +- cmd/k8s-operator/egress-services.go | 2 +- cmd/k8s-operator/egress-services_test.go | 2 +- cmd/k8s-operator/ingress-for-pg.go | 2 +- cmd/k8s-operator/ingress-for-pg_test.go | 2 +- cmd/k8s-operator/nameserver_test.go | 2 +- cmd/k8s-operator/operator_test.go | 2 +- cmd/k8s-operator/proxygroup.go | 2 +- cmd/k8s-operator/proxygroup_test.go | 2 +- cmd/k8s-operator/sts.go | 2 +- cmd/k8s-operator/svc-for-pg.go | 2 +- cmd/k8s-operator/svc-for-pg_test.go | 2 +- cmd/k8s-operator/testutils_test.go | 2 +- cmd/k8s-operator/tsrecorder.go | 2 +- cmd/k8s-operator/tsrecorder_test.go | 2 +- cmd/natc/ippool/consensusippool.go | 2 +- cmd/natc/ippool/consensusippool_test.go | 2 +- cmd/natc/ippool/consensusippoolserialize.go | 2 +- cmd/netlogfmt/main.go | 2 +- cmd/sniproxy/sniproxy_test.go | 2 +- cmd/stund/depaware.txt | 3 ++- cmd/stunstamp/stunstamp.go | 2 +- cmd/tailscale/cli/cli_test.go | 2 +- cmd/tailscale/cli/configure-synology-cert.go | 2 +- cmd/tailscale/cli/configure-synology-cert_test.go | 2 +- cmd/tailscale/cli/debug.go | 2 +- cmd/tailscale/cli/netcheck.go | 2 +- cmd/tailscale/cli/network-lock.go | 2 +- cmd/tailscale/cli/serve_legacy.go | 2 +- cmd/tailscale/cli/serve_v2.go | 2 +- cmd/tailscale/cli/serve_v2_test.go | 2 +- cmd/tailscale/cli/status.go | 2 +- cmd/tailscale/cli/syspolicy.go | 2 +- cmd/tailscale/cli/up.go | 2 +- cmd/tailscale/cli/version.go | 2 +- cmd/tailscale/cli/whois.go | 2 +- cmd/tailscale/depaware.txt | 1 + cmd/tailscaled/debug.go | 2 +- cmd/tailscaled/depaware.txt | 1 + cmd/tailscaled/tailscaled_windows.go | 2 +- cmd/testwrapper/testwrapper.go | 2 +- cmd/tsconnect/build-pkg.go | 2 +- cmd/tsconnect/build.go | 2 +- cmd/tsconnect/serve.go | 2 +- cmd/tsconnect/wasm/wasm_js.go | 2 +- cmd/tsidp/depaware.txt | 1 + cmd/tsidp/tsidp.go | 2 +- cmd/tsidp/tsidp_test.go | 2 +- cmd/viewer/tests/tests_view.go | 2 +- cmd/viewer/viewer.go | 2 +- control/controlclient/direct.go | 2 +- control/controlclient/direct_test.go | 2 +- control/controlclient/map.go | 2 +- control/controlclient/map_test.go | 2 +- control/controlclient/noise.go | 2 +- control/controlclient/noise_test.go | 2 +- control/controlclient/status.go | 2 +- derp/derp_client.go | 2 +- derp/derp_server.go | 2 +- derp/derp_test.go | 2 +- derp/derphttp/derphttp_test.go | 2 +- docs/webhooks/example.go | 2 +- drive/drive_view.go | 2 +- drive/remote_permissions.go | 2 +- drive/remote_permissions_test.go | 2 +- feature/relayserver/relayserver.go | 2 +- feature/taildrop/localapi.go | 2 +- feature/taildrop/peerapi.go | 2 +- feature/tpm/tpm.go | 2 +- feature/tpm/tpm_test.go | 2 +- feature/wakeonlan/wakeonlan.go | 2 +- gokrazy/build.go | 2 +- hostinfo/hostinfo_test.go | 2 +- internal/client/tailscale/vip_service.go | 2 +- internal/noiseconn/conn.go | 2 +- ipn/auditlog/auditlog.go | 2 +- ipn/conffile/conffile.go | 2 +- ipn/ipn_view.go | 2 +- ipn/ipnauth/actor.go | 2 +- ipn/ipnlocal/c2n.go | 2 +- ipn/ipnlocal/c2n_test.go | 2 +- ipn/ipnlocal/cert.go | 2 +- ipn/ipnlocal/dnsconfig_test.go | 2 +- ipn/ipnlocal/local.go | 2 +- ipn/ipnlocal/local_test.go | 2 +- ipn/ipnlocal/network-lock.go | 2 +- ipn/ipnlocal/network-lock_test.go | 2 +- ipn/ipnlocal/peerapi.go | 2 +- ipn/ipnlocal/peerapi_test.go | 2 +- ipn/ipnlocal/profiles.go | 2 +- ipn/ipnlocal/serve.go | 2 +- ipn/ipnlocal/serve_test.go | 2 +- ipn/ipnlocal/ssh_test.go | 2 +- ipn/ipnlocal/web_client.go | 2 +- ipn/ipnserver/server.go | 2 +- ipn/localapi/debugderp.go | 2 +- ipn/localapi/localapi.go | 2 +- ipn/localapi/localapi_test.go | 2 +- ipn/prefs.go | 2 +- ipn/prefs_test.go | 2 +- ipn/store/kubestore/store_kube_test.go | 2 +- ipn/store/mem/store_mem.go | 2 +- ipn/store/stores.go | 2 +- jsondb/db.go | 2 +- k8s-operator/sessionrecording/fakes/fakes.go | 2 +- k8s-operator/sessionrecording/spdy/conn.go | 2 +- k8s-operator/sessionrecording/spdy/conn_test.go | 2 +- k8s-operator/sessionrecording/tsrecorder/tsrecorder.go | 2 +- k8s-operator/sessionrecording/ws/conn.go | 2 +- kube/egressservices/egressservices.go | 2 +- kube/egressservices/egressservices_test.go | 2 +- kube/k8s-proxy/conf/conf.go | 2 +- kube/kubeclient/client.go | 2 +- kube/kubeclient/client_test.go | 2 +- kube/state/state.go | 2 +- log/sockstatlog/logger.go | 2 +- logpolicy/logpolicy.go | 2 +- logtail/example/logreprocess/logreprocess.go | 2 +- logtail/logtail_test.go | 2 +- metrics/multilabelmap_test.go | 2 +- net/dns/resolver/tsdns_test.go | 2 +- net/dnsfallback/dnsfallback.go | 2 +- net/dnsfallback/dnsfallback_test.go | 2 +- net/dnsfallback/update-dns-fallbacks.go | 2 +- net/flowtrack/flowtrack.go | 2 +- net/flowtrack/flowtrack_test.go | 2 +- net/netmon/interfaces_test.go | 2 +- net/netmon/netmon.go | 2 +- net/speedtest/speedtest_client.go | 2 +- net/speedtest/speedtest_server.go | 2 +- net/udprelay/endpoint/endpoint_test.go | 2 +- portlist/netstat_test.go | 2 +- prober/derp.go | 2 +- prober/derp_test.go | 2 +- prober/prober.go | 2 +- prober/prober_test.go | 2 +- sessionrecording/connect.go | 2 +- sessionrecording/connect_test.go | 2 +- ssh/tailssh/incubator.go | 2 +- ssh/tailssh/incubator_plan9.go | 2 +- ssh/tailssh/privs_test.go | 2 +- ssh/tailssh/tailssh.go | 2 +- ssh/tailssh/tailssh_test.go | 2 +- syncs/shardedint.go | 2 +- tailcfg/tailcfg.go | 2 +- tailcfg/tailcfg_test.go | 2 +- tailcfg/tailcfg_view.go | 2 +- tempfork/acme/acme.go | 2 +- tempfork/acme/acme_test.go | 2 +- tempfork/acme/http.go | 2 +- tempfork/acme/jws.go | 2 +- tempfork/acme/jws_test.go | 2 +- tempfork/acme/rfc8555.go | 2 +- tempfork/acme/rfc8555_test.go | 2 +- tempfork/acme/types.go | 2 +- tsconsensus/http.go | 2 +- tsconsensus/monitor.go | 2 +- tsconsensus/tsconsensus.go | 2 +- tsconsensus/tsconsensus_test.go | 2 +- tsnet/depaware.txt | 1 + tstest/deptest/deptest.go | 2 +- tstest/integration/gen_deps.go | 2 +- tstest/integration/integration.go | 2 +- tstest/integration/integration_test.go | 2 +- tstest/integration/testcontrol/testcontrol.go | 2 +- tstest/integration/vms/distros.go | 2 +- tstest/integration/vms/dns_tester.go | 2 +- tstest/integration/vms/opensuse_leap_15_1_test.go | 2 +- tstest/iosdeps/iosdeps.go | 2 +- tstest/jsdeps/jsdeps.go | 2 +- tstest/mts/mts.go | 2 +- tstest/natlab/vnet/vnet.go | 2 +- tstime/mono/mono_test.go | 2 +- tstime/rate/value.go | 4 ++-- tstime/tstime_test.go | 2 +- tsweb/log.go | 2 +- types/appctype/appconnector_test.go | 2 +- types/dnstype/dnstype_view.go | 2 +- types/ipproto/ipproto_test.go | 2 +- types/key/control.go | 2 +- types/key/control_test.go | 2 +- types/key/derp.go | 2 +- types/key/disco_test.go | 2 +- types/key/machine_test.go | 2 +- types/key/node_test.go | 2 +- types/logger/logger.go | 2 +- types/netlogtype/netlogtype_test.go | 2 +- types/netmap/netmap.go | 2 +- types/opt/bool_test.go | 2 +- types/opt/value_test.go | 4 ++-- types/persist/persist_view.go | 2 +- types/prefs/prefs_example/prefs_example_view.go | 2 +- types/prefs/prefs_test.go | 2 +- types/prefs/prefs_view_test.go | 2 +- types/tkatype/tkatype_test.go | 2 +- types/views/views.go | 2 +- types/views/views_test.go | 2 +- util/cloudenv/cloudenv.go | 2 +- util/expvarx/expvarx.go | 2 +- util/jsonutil/unmarshal.go | 2 +- util/jsonutil/unmarshal_test.go | 2 +- util/reload/reload.go | 2 +- util/set/set.go | 2 +- util/set/set_test.go | 2 +- util/syspolicy/setting/snapshot_test.go | 2 +- util/winutil/svcdiag_windows.go | 2 +- wgengine/filter/filter_test.go | 2 +- wgengine/magicsock/relaymanager.go | 2 +- wgengine/netlog/logger.go | 2 +- wgengine/router/router_windows.go | 2 +- 242 files changed, 245 insertions(+), 238 deletions(-) diff --git a/client/local/local.go b/client/local/local.go index 74c4f0b6f..7bc4ed79d 100644 --- a/client/local/local.go +++ b/client/local/local.go @@ -11,7 +11,7 @@ import ( "context" "crypto/tls" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/client/tailscale/acl.go b/client/tailscale/acl.go index 929ec2b3b..0e7fd1f4a 100644 --- a/client/tailscale/acl.go +++ b/client/tailscale/acl.go @@ -8,7 +8,7 @@ package tailscale import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/http" "net/netip" diff --git a/client/tailscale/devices.go b/client/tailscale/devices.go index 0664f9e63..87f0694bb 100644 --- a/client/tailscale/devices.go +++ b/client/tailscale/devices.go @@ -8,7 +8,7 @@ package tailscale import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "net/http" diff --git a/client/tailscale/dns.go b/client/tailscale/dns.go index bbdc7c56c..1e4889a22 100644 --- a/client/tailscale/dns.go +++ b/client/tailscale/dns.go @@ -8,7 +8,7 @@ package tailscale import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/http" diff --git a/client/tailscale/keys.go b/client/tailscale/keys.go index 79e19e998..7f5e1a38c 100644 --- a/client/tailscale/keys.go +++ b/client/tailscale/keys.go @@ -6,7 +6,7 @@ package tailscale import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/http" "time" diff --git a/client/tailscale/routes.go b/client/tailscale/routes.go index b72f2743f..a7feaee4f 100644 --- a/client/tailscale/routes.go +++ b/client/tailscale/routes.go @@ -8,7 +8,7 @@ package tailscale import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/http" "net/netip" diff --git a/client/tailscale/tailscale.go b/client/tailscale/tailscale.go index 76e44454b..a683f0b77 100644 --- a/client/tailscale/tailscale.go +++ b/client/tailscale/tailscale.go @@ -12,7 +12,7 @@ package tailscale import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/client/web/web.go b/client/web/web.go index f3158cd1f..2f9fddb69 100644 --- a/client/web/web.go +++ b/client/web/web.go @@ -6,7 +6,7 @@ package web import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/client/web/web_test.go b/client/web/web_test.go index 12dbb5c79..c4f7c3dd5 100644 --- a/client/web/web_test.go +++ b/client/web/web_test.go @@ -6,7 +6,7 @@ package web import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/clientupdate/clientupdate.go b/clientupdate/clientupdate.go index ffd3fb03b..67ae39f97 100644 --- a/clientupdate/clientupdate.go +++ b/clientupdate/clientupdate.go @@ -12,7 +12,7 @@ import ( "bytes" "compress/gzip" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/cmd/connector-gen/aws.go b/cmd/connector-gen/aws.go index bd2632ae2..f1c16b769 100644 --- a/cmd/connector-gen/aws.go +++ b/cmd/connector-gen/aws.go @@ -4,7 +4,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "net/http" diff --git a/cmd/connector-gen/github.go b/cmd/connector-gen/github.go index def40872d..a071d7922 100644 --- a/cmd/connector-gen/github.go +++ b/cmd/connector-gen/github.go @@ -4,7 +4,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "net/http" diff --git a/cmd/containerboot/egressservices.go b/cmd/containerboot/egressservices.go index 71141f17a..0123907c8 100644 --- a/cmd/containerboot/egressservices.go +++ b/cmd/containerboot/egressservices.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "log" diff --git a/cmd/containerboot/ingressservices.go b/cmd/containerboot/ingressservices.go index 1a2da9567..696f1cb13 100644 --- a/cmd/containerboot/ingressservices.go +++ b/cmd/containerboot/ingressservices.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "net/netip" diff --git a/cmd/containerboot/kube.go b/cmd/containerboot/kube.go index d4a974e6f..b7b404223 100644 --- a/cmd/containerboot/kube.go +++ b/cmd/containerboot/kube.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "log" diff --git a/cmd/containerboot/main_test.go b/cmd/containerboot/main_test.go index 96feef682..adcabf478 100644 --- a/cmd/containerboot/main_test.go +++ b/cmd/containerboot/main_test.go @@ -9,7 +9,7 @@ import ( "bytes" _ "embed" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/cmd/containerboot/serve.go b/cmd/containerboot/serve.go index 37fd49777..9ccfb4d32 100644 --- a/cmd/containerboot/serve.go +++ b/cmd/containerboot/serve.go @@ -8,7 +8,7 @@ package main import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "log" "os" "path/filepath" diff --git a/cmd/derper/bootstrap_dns.go b/cmd/derper/bootstrap_dns.go index a58f040ba..f8796a2a5 100644 --- a/cmd/derper/bootstrap_dns.go +++ b/cmd/derper/bootstrap_dns.go @@ -6,7 +6,7 @@ package main import ( "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "expvar" "log" "math/rand/v2" diff --git a/cmd/derper/bootstrap_dns_test.go b/cmd/derper/bootstrap_dns_test.go index 9b99103ab..1e1990a68 100644 --- a/cmd/derper/bootstrap_dns_test.go +++ b/cmd/derper/bootstrap_dns_test.go @@ -5,7 +5,7 @@ package main import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "net" "net/http" diff --git a/cmd/derper/cert.go b/cmd/derper/cert.go index b95755c64..e1b674266 100644 --- a/cmd/derper/cert.go +++ b/cmd/derper/cert.go @@ -11,7 +11,7 @@ import ( "crypto/tls" "crypto/x509" "crypto/x509/pkix" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/cmd/derper/depaware.txt b/cmd/derper/depaware.txt index 7adbf397f..03e2acdc5 100644 --- a/cmd/derper/depaware.txt +++ b/cmd/derper/depaware.txt @@ -20,6 +20,7 @@ tailscale.com/cmd/derper dependencies: (generated by github.com/tailscale/depawa 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/go-json-experiment/json/v1 from tailscale.com/client/local+ 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/derper/derper.go b/cmd/derper/derper.go index 7ea404beb..04f875763 100644 --- a/cmd/derper/derper.go +++ b/cmd/derper/derper.go @@ -14,7 +14,7 @@ import ( "cmp" "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "expvar" "flag" diff --git a/cmd/gitops-pusher/cache.go b/cmd/gitops-pusher/cache.go index 6792e5e63..9aaaa3813 100644 --- a/cmd/gitops-pusher/cache.go +++ b/cmd/gitops-pusher/cache.go @@ -4,7 +4,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "os" ) diff --git a/cmd/gitops-pusher/gitops-pusher.go b/cmd/gitops-pusher/gitops-pusher.go index 690ca2870..71b7f30af 100644 --- a/cmd/gitops-pusher/gitops-pusher.go +++ b/cmd/gitops-pusher/gitops-pusher.go @@ -10,7 +10,7 @@ import ( "bytes" "context" "crypto/sha256" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "io" diff --git a/cmd/gitops-pusher/gitops-pusher_test.go b/cmd/gitops-pusher/gitops-pusher_test.go index e08b06c9c..210e1de02 100644 --- a/cmd/gitops-pusher/gitops-pusher_test.go +++ b/cmd/gitops-pusher/gitops-pusher_test.go @@ -4,7 +4,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "strings" "testing" diff --git a/cmd/hello/hello.go b/cmd/hello/hello.go index fa116b28b..73e3939c0 100644 --- a/cmd/hello/hello.go +++ b/cmd/hello/hello.go @@ -8,7 +8,7 @@ import ( "context" "crypto/tls" _ "embed" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "html/template" diff --git a/cmd/k8s-nameserver/main.go b/cmd/k8s-nameserver/main.go index ca4b44935..65fd3c8d0 100644 --- a/cmd/k8s-nameserver/main.go +++ b/cmd/k8s-nameserver/main.go @@ -10,7 +10,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "net" diff --git a/cmd/k8s-operator/depaware.txt b/cmd/k8s-operator/depaware.txt index f810d1b4f..8d8b89872 100644 --- a/cmd/k8s-operator/depaware.txt +++ b/cmd/k8s-operator/depaware.txt @@ -110,6 +110,7 @@ tailscale.com/cmd/k8s-operator dependencies: (generated by github.com/tailscale/ 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/v1 from tailscale.com/client/local+ github.com/go-logr/logr from github.com/go-logr/logr/slogr+ github.com/go-logr/logr/slogr from github.com/go-logr/zapr github.com/go-logr/zapr from sigs.k8s.io/controller-runtime/pkg/log/zap+ diff --git a/cmd/k8s-operator/dnsrecords.go b/cmd/k8s-operator/dnsrecords.go index f91dd49ec..02d1aff03 100644 --- a/cmd/k8s-operator/dnsrecords.go +++ b/cmd/k8s-operator/dnsrecords.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "slices" "strings" diff --git a/cmd/k8s-operator/dnsrecords_test.go b/cmd/k8s-operator/dnsrecords_test.go index 4e73e6c9e..e98263525 100644 --- a/cmd/k8s-operator/dnsrecords_test.go +++ b/cmd/k8s-operator/dnsrecords_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "testing" diff --git a/cmd/k8s-operator/e2e/proxy_test.go b/cmd/k8s-operator/e2e/proxy_test.go index eac983e88..f6368fa40 100644 --- a/cmd/k8s-operator/e2e/proxy_test.go +++ b/cmd/k8s-operator/e2e/proxy_test.go @@ -5,7 +5,7 @@ package e2e import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "strings" "testing" diff --git a/cmd/k8s-operator/egress-eps.go b/cmd/k8s-operator/egress-eps.go index 3441e12ba..f343a4466 100644 --- a/cmd/k8s-operator/egress-eps.go +++ b/cmd/k8s-operator/egress-eps.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/netip" "reflect" diff --git a/cmd/k8s-operator/egress-eps_test.go b/cmd/k8s-operator/egress-eps_test.go index bd81071cb..e7d60ed6f 100644 --- a/cmd/k8s-operator/egress-eps_test.go +++ b/cmd/k8s-operator/egress-eps_test.go @@ -6,7 +6,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "math/rand/v2" "testing" diff --git a/cmd/k8s-operator/egress-services.go b/cmd/k8s-operator/egress-services.go index ca6562071..8c3584240 100644 --- a/cmd/k8s-operator/egress-services.go +++ b/cmd/k8s-operator/egress-services.go @@ -8,7 +8,7 @@ package main import ( "context" "crypto/sha256" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "math/rand/v2" diff --git a/cmd/k8s-operator/egress-services_test.go b/cmd/k8s-operator/egress-services_test.go index d8a5dfd32..b466b1bb6 100644 --- a/cmd/k8s-operator/egress-services_test.go +++ b/cmd/k8s-operator/egress-services_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "testing" diff --git a/cmd/k8s-operator/ingress-for-pg.go b/cmd/k8s-operator/ingress-for-pg.go index aaf22d471..a368ac38c 100644 --- a/cmd/k8s-operator/ingress-for-pg.go +++ b/cmd/k8s-operator/ingress-for-pg.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "math/rand/v2" diff --git a/cmd/k8s-operator/ingress-for-pg_test.go b/cmd/k8s-operator/ingress-for-pg_test.go index 5de86cdad..a6cd8d712 100644 --- a/cmd/k8s-operator/ingress-for-pg_test.go +++ b/cmd/k8s-operator/ingress-for-pg_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "maps" "reflect" diff --git a/cmd/k8s-operator/nameserver_test.go b/cmd/k8s-operator/nameserver_test.go index cec95b84e..3087bc354 100644 --- a/cmd/k8s-operator/nameserver_test.go +++ b/cmd/k8s-operator/nameserver_test.go @@ -9,7 +9,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" "time" diff --git a/cmd/k8s-operator/operator_test.go b/cmd/k8s-operator/operator_test.go index 1f700f13a..824faae9b 100644 --- a/cmd/k8s-operator/operator_test.go +++ b/cmd/k8s-operator/operator_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "testing" "time" diff --git a/cmd/k8s-operator/proxygroup.go b/cmd/k8s-operator/proxygroup.go index 1fdc076f9..0eff22eff 100644 --- a/cmd/k8s-operator/proxygroup.go +++ b/cmd/k8s-operator/proxygroup.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/http" diff --git a/cmd/k8s-operator/proxygroup_test.go b/cmd/k8s-operator/proxygroup_test.go index 6f143c056..ca60ca496 100644 --- a/cmd/k8s-operator/proxygroup_test.go +++ b/cmd/k8s-operator/proxygroup_test.go @@ -6,7 +6,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/netip" "slices" diff --git a/cmd/k8s-operator/sts.go b/cmd/k8s-operator/sts.go index df12554e0..00621ea74 100644 --- a/cmd/k8s-operator/sts.go +++ b/cmd/k8s-operator/sts.go @@ -8,7 +8,7 @@ package main import ( "context" _ "embed" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/http" diff --git a/cmd/k8s-operator/svc-for-pg.go b/cmd/k8s-operator/svc-for-pg.go index 4247eaaa0..96118b05d 100644 --- a/cmd/k8s-operator/svc-for-pg.go +++ b/cmd/k8s-operator/svc-for-pg.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/http" diff --git a/cmd/k8s-operator/svc-for-pg_test.go b/cmd/k8s-operator/svc-for-pg_test.go index 054c3ed49..2f71caf7b 100644 --- a/cmd/k8s-operator/svc-for-pg_test.go +++ b/cmd/k8s-operator/svc-for-pg_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "math/rand/v2" "net/netip" diff --git a/cmd/k8s-operator/testutils_test.go b/cmd/k8s-operator/testutils_test.go index 56542700d..5f6e898f1 100644 --- a/cmd/k8s-operator/testutils_test.go +++ b/cmd/k8s-operator/testutils_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/http" "net/netip" diff --git a/cmd/k8s-operator/tsrecorder.go b/cmd/k8s-operator/tsrecorder.go index ec95ecf40..aa8582d40 100644 --- a/cmd/k8s-operator/tsrecorder.go +++ b/cmd/k8s-operator/tsrecorder.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/http" diff --git a/cmd/k8s-operator/tsrecorder_test.go b/cmd/k8s-operator/tsrecorder_test.go index 990bd6819..1eeaf274f 100644 --- a/cmd/k8s-operator/tsrecorder_test.go +++ b/cmd/k8s-operator/tsrecorder_test.go @@ -7,7 +7,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "strings" "testing" diff --git a/cmd/natc/ippool/consensusippool.go b/cmd/natc/ippool/consensusippool.go index 3bc21bd03..06de174e4 100644 --- a/cmd/natc/ippool/consensusippool.go +++ b/cmd/natc/ippool/consensusippool.go @@ -5,7 +5,7 @@ package ippool import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "log" diff --git a/cmd/natc/ippool/consensusippool_test.go b/cmd/natc/ippool/consensusippool_test.go index 242cdffaf..4239ced55 100644 --- a/cmd/natc/ippool/consensusippool_test.go +++ b/cmd/natc/ippool/consensusippool_test.go @@ -5,7 +5,7 @@ package ippool import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "net/netip" diff --git a/cmd/natc/ippool/consensusippoolserialize.go b/cmd/natc/ippool/consensusippoolserialize.go index 97dc02f2c..a35082e27 100644 --- a/cmd/natc/ippool/consensusippoolserialize.go +++ b/cmd/natc/ippool/consensusippoolserialize.go @@ -4,7 +4,7 @@ package ippool import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "log" "maps" diff --git a/cmd/netlogfmt/main.go b/cmd/netlogfmt/main.go index 65e87098f..e7924f680 100644 --- a/cmd/netlogfmt/main.go +++ b/cmd/netlogfmt/main.go @@ -27,7 +27,7 @@ package main import ( "cmp" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "io" diff --git a/cmd/sniproxy/sniproxy_test.go b/cmd/sniproxy/sniproxy_test.go index cd2e070bd..fa17e3aa4 100644 --- a/cmd/sniproxy/sniproxy_test.go +++ b/cmd/sniproxy/sniproxy_test.go @@ -5,7 +5,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "log" diff --git a/cmd/stund/depaware.txt b/cmd/stund/depaware.txt index 81544b750..6b0d02092 100644 --- a/cmd/stund/depaware.txt +++ b/cmd/stund/depaware.txt @@ -2,12 +2,13 @@ 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/opt + github.com/go-json-experiment/json from tailscale.com/types/opt+ 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/go-json-experiment/json/v1 from tailscale.com/syncs+ github.com/munnerz/goautoneg from github.com/prometheus/common/expfmt 💣 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 diff --git a/cmd/stunstamp/stunstamp.go b/cmd/stunstamp/stunstamp.go index c3842e2e8..07d76060b 100644 --- a/cmd/stunstamp/stunstamp.go +++ b/cmd/stunstamp/stunstamp.go @@ -9,7 +9,7 @@ import ( "cmp" "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/cli_test.go b/cmd/tailscale/cli/cli_test.go index 5dd4fa234..b8871de48 100644 --- a/cmd/tailscale/cli/cli_test.go +++ b/cmd/tailscale/cli/cli_test.go @@ -6,7 +6,7 @@ package cli import ( "bytes" stdcmp "cmp" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "io" diff --git a/cmd/tailscale/cli/configure-synology-cert.go b/cmd/tailscale/cli/configure-synology-cert.go index 663d0c879..6c2b54dcf 100644 --- a/cmd/tailscale/cli/configure-synology-cert.go +++ b/cmd/tailscale/cli/configure-synology-cert.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/configure-synology-cert_test.go b/cmd/tailscale/cli/configure-synology-cert_test.go index 801285e55..dda938e0d 100644 --- a/cmd/tailscale/cli/configure-synology-cert_test.go +++ b/cmd/tailscale/cli/configure-synology-cert_test.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "reflect" "testing" diff --git a/cmd/tailscale/cli/debug.go b/cmd/tailscale/cli/debug.go index ec8a0700d..18a80b071 100644 --- a/cmd/tailscale/cli/debug.go +++ b/cmd/tailscale/cli/debug.go @@ -8,7 +8,7 @@ import ( "bytes" "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/netcheck.go b/cmd/tailscale/cli/netcheck.go index 3cf05a3b7..9c58a7528 100644 --- a/cmd/tailscale/cli/netcheck.go +++ b/cmd/tailscale/cli/netcheck.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "io" diff --git a/cmd/tailscale/cli/network-lock.go b/cmd/tailscale/cli/network-lock.go index d19909576..c7c88a3d5 100644 --- a/cmd/tailscale/cli/network-lock.go +++ b/cmd/tailscale/cli/network-lock.go @@ -8,7 +8,7 @@ import ( "context" "crypto/rand" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/serve_legacy.go b/cmd/tailscale/cli/serve_legacy.go index 96629b5ad..e5e35a3a0 100644 --- a/cmd/tailscale/cli/serve_legacy.go +++ b/cmd/tailscale/cli/serve_legacy.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/serve_v2.go b/cmd/tailscale/cli/serve_v2.go index bb51fb7d0..81fdc6008 100644 --- a/cmd/tailscale/cli/serve_v2.go +++ b/cmd/tailscale/cli/serve_v2.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/serve_v2_test.go b/cmd/tailscale/cli/serve_v2_test.go index 5768127ad..a433f15f4 100644 --- a/cmd/tailscale/cli/serve_v2_test.go +++ b/cmd/tailscale/cli/serve_v2_test.go @@ -6,7 +6,7 @@ package cli import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "os" "path/filepath" diff --git a/cmd/tailscale/cli/status.go b/cmd/tailscale/cli/status.go index 85679a7de..cd15480a7 100644 --- a/cmd/tailscale/cli/status.go +++ b/cmd/tailscale/cli/status.go @@ -7,7 +7,7 @@ import ( "bytes" "cmp" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/syspolicy.go b/cmd/tailscale/cli/syspolicy.go index a71952a9f..d9933c514 100644 --- a/cmd/tailscale/cli/syspolicy.go +++ b/cmd/tailscale/cli/syspolicy.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "os" diff --git a/cmd/tailscale/cli/up.go b/cmd/tailscale/cli/up.go index 1863957d3..5e0d7184d 100644 --- a/cmd/tailscale/cli/up.go +++ b/cmd/tailscale/cli/up.go @@ -6,7 +6,7 @@ package cli import ( "context" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/cli/version.go b/cmd/tailscale/cli/version.go index b25502d5a..800c378d3 100644 --- a/cmd/tailscale/cli/version.go +++ b/cmd/tailscale/cli/version.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" diff --git a/cmd/tailscale/cli/whois.go b/cmd/tailscale/cli/whois.go index 44ff68dec..3e60e1323 100644 --- a/cmd/tailscale/cli/whois.go +++ b/cmd/tailscale/cli/whois.go @@ -5,7 +5,7 @@ package cli import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscale/depaware.txt b/cmd/tailscale/depaware.txt index e44e20e8c..3102b3138 100644 --- a/cmd/tailscale/depaware.txt +++ b/cmd/tailscale/depaware.txt @@ -19,6 +19,7 @@ tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/dep 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/go-json-experiment/json/v1 from tailscale.com/client/local+ 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/debug.go b/cmd/tailscaled/debug.go index 2f469a0d1..97765c98f 100644 --- a/cmd/tailscaled/debug.go +++ b/cmd/tailscaled/debug.go @@ -8,7 +8,7 @@ package main import ( "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/cmd/tailscaled/depaware.txt b/cmd/tailscaled/depaware.txt index 7c4885a4b..b3e791c1b 100644 --- a/cmd/tailscaled/depaware.txt +++ b/cmd/tailscaled/depaware.txt @@ -104,6 +104,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de 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/v1 from tailscale.com/client/local+ 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/cmd/tailscaled/tailscaled_windows.go b/cmd/tailscaled/tailscaled_windows.go index 1b5068892..131f64fbb 100644 --- a/cmd/tailscaled/tailscaled_windows.go +++ b/cmd/tailscaled/tailscaled_windows.go @@ -21,7 +21,7 @@ package main // import "tailscale.com/cmd/tailscaled" import ( "bufio" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/cmd/testwrapper/testwrapper.go b/cmd/testwrapper/testwrapper.go index 173edee73..c84285547 100644 --- a/cmd/testwrapper/testwrapper.go +++ b/cmd/testwrapper/testwrapper.go @@ -12,7 +12,7 @@ import ( "bytes" "cmp" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/cmd/tsconnect/build-pkg.go b/cmd/tsconnect/build-pkg.go index 047504858..9fe4548d5 100644 --- a/cmd/tsconnect/build-pkg.go +++ b/cmd/tsconnect/build-pkg.go @@ -6,7 +6,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "os" diff --git a/cmd/tsconnect/build.go b/cmd/tsconnect/build.go index 364ebf536..04272b9a0 100644 --- a/cmd/tsconnect/build.go +++ b/cmd/tsconnect/build.go @@ -6,7 +6,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "os" diff --git a/cmd/tsconnect/serve.go b/cmd/tsconnect/serve.go index d780bdd57..41a13fc5f 100644 --- a/cmd/tsconnect/serve.go +++ b/cmd/tsconnect/serve.go @@ -8,7 +8,7 @@ package main import ( "bytes" "embed" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "io/fs" diff --git a/cmd/tsconnect/wasm/wasm_js.go b/cmd/tsconnect/wasm/wasm_js.go index ebf7284aa..b066b07fe 100644 --- a/cmd/tsconnect/wasm/wasm_js.go +++ b/cmd/tsconnect/wasm/wasm_js.go @@ -13,7 +13,7 @@ import ( "bytes" "context" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "math/rand/v2" diff --git a/cmd/tsidp/depaware.txt b/cmd/tsidp/depaware.txt index b28460352..ea2b93244 100644 --- a/cmd/tsidp/depaware.txt +++ b/cmd/tsidp/depaware.txt @@ -101,6 +101,7 @@ tailscale.com/cmd/tsidp dependencies: (generated by github.com/tailscale/depawar 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/go-json-experiment/json/v1 from tailscale.com/client/local+ 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/cmd/tsidp/tsidp.go b/cmd/tsidp/tsidp.go index 6a0c2d89e..1405fbb1c 100644 --- a/cmd/tsidp/tsidp.go +++ b/cmd/tsidp/tsidp.go @@ -16,7 +16,7 @@ import ( "crypto/x509" "encoding/base64" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "flag" diff --git a/cmd/tsidp/tsidp_test.go b/cmd/tsidp/tsidp_test.go index e5465d3cf..2450ade8d 100644 --- a/cmd/tsidp/tsidp_test.go +++ b/cmd/tsidp/tsidp_test.go @@ -6,7 +6,7 @@ package main import ( "crypto/rand" "crypto/rsa" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/cmd/viewer/tests/tests_view.go b/cmd/viewer/tests/tests_view.go index f1d8f424f..b42e46f64 100644 --- a/cmd/viewer/tests/tests_view.go +++ b/cmd/viewer/tests/tests_view.go @@ -6,7 +6,7 @@ package tests import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" diff --git a/cmd/viewer/viewer.go b/cmd/viewer/viewer.go index 2d30cc2eb..02ff8124f 100644 --- a/cmd/viewer/viewer.go +++ b/cmd/viewer/viewer.go @@ -125,7 +125,7 @@ func genView(buf *bytes.Buffer, it *codegen.ImportTracker, typ *types.Named, _ * if !ok || codegen.IsViewType(t) { return } - it.Import("encoding/json") + it.Import("github.com/go-json-experiment/json/v1") it.Import("errors") args := struct { diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index 4c9b04ce9..28461f398 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -8,7 +8,7 @@ import ( "bytes" "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/control/controlclient/direct_test.go b/control/controlclient/direct_test.go index e2a6f9fa4..263e150ca 100644 --- a/control/controlclient/direct_test.go +++ b/control/controlclient/direct_test.go @@ -4,7 +4,7 @@ package controlclient import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/http" "net/http/httptest" "net/netip" diff --git a/control/controlclient/map.go b/control/controlclient/map.go index 22cea5aca..a88244340 100644 --- a/control/controlclient/map.go +++ b/control/controlclient/map.go @@ -8,7 +8,7 @@ import ( "context" "crypto/sha256" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "maps" "net" diff --git a/control/controlclient/map_test.go b/control/controlclient/map_test.go index 7e42f6f6a..5a3c456a2 100644 --- a/control/controlclient/map_test.go +++ b/control/controlclient/map_test.go @@ -5,7 +5,7 @@ package controlclient import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "maps" "net/netip" diff --git a/control/controlclient/noise.go b/control/controlclient/noise.go index 4bd8cfc25..3e24b766d 100644 --- a/control/controlclient/noise.go +++ b/control/controlclient/noise.go @@ -7,7 +7,7 @@ import ( "bytes" "cmp" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "math" "net/http" diff --git a/control/controlclient/noise_test.go b/control/controlclient/noise_test.go index 4904016f2..557645a63 100644 --- a/control/controlclient/noise_test.go +++ b/control/controlclient/noise_test.go @@ -6,7 +6,7 @@ package controlclient import ( "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "math" "net/http" diff --git a/control/controlclient/status.go b/control/controlclient/status.go index d0fdf80d7..2d7979ecc 100644 --- a/control/controlclient/status.go +++ b/control/controlclient/status.go @@ -4,7 +4,7 @@ package controlclient import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "reflect" diff --git a/derp/derp_client.go b/derp/derp_client.go index 69f35db1e..9bd3e6cad 100644 --- a/derp/derp_client.go +++ b/derp/derp_client.go @@ -6,7 +6,7 @@ package derp import ( "bufio" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/derp/derp_server.go b/derp/derp_server.go index bd67e7eec..5144d7147 100644 --- a/derp/derp_server.go +++ b/derp/derp_server.go @@ -15,7 +15,7 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "expvar" "fmt" diff --git a/derp/derp_test.go b/derp/derp_test.go index 9d07e159b..1e5e98646 100644 --- a/derp/derp_test.go +++ b/derp/derp_test.go @@ -10,7 +10,7 @@ import ( "context" "crypto/x509" "encoding/asn1" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "expvar" "fmt" diff --git a/derp/derphttp/derphttp_test.go b/derp/derphttp/derphttp_test.go index bb33e6023..f2c9c2dc2 100644 --- a/derp/derphttp/derphttp_test.go +++ b/derp/derphttp/derphttp_test.go @@ -7,7 +7,7 @@ import ( "bytes" "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "maps" diff --git a/docs/webhooks/example.go b/docs/webhooks/example.go index 712028362..618b296f9 100644 --- a/docs/webhooks/example.go +++ b/docs/webhooks/example.go @@ -10,7 +10,7 @@ import ( "crypto/sha256" "crypto/subtle" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/drive/drive_view.go b/drive/drive_view.go index 0f6686f24..14a47c05f 100644 --- a/drive/drive_view.go +++ b/drive/drive_view.go @@ -6,7 +6,7 @@ package drive import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "tailscale.com/types/views" diff --git a/drive/remote_permissions.go b/drive/remote_permissions.go index 420eff9a0..73439c2b2 100644 --- a/drive/remote_permissions.go +++ b/drive/remote_permissions.go @@ -4,7 +4,7 @@ package drive import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" ) diff --git a/drive/remote_permissions_test.go b/drive/remote_permissions_test.go index ff039c800..ccda9a488 100644 --- a/drive/remote_permissions_test.go +++ b/drive/remote_permissions_test.go @@ -4,7 +4,7 @@ package drive import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" ) diff --git a/feature/relayserver/relayserver.go b/feature/relayserver/relayserver.go index d0ad27624..be59c5a73 100644 --- a/feature/relayserver/relayserver.go +++ b/feature/relayserver/relayserver.go @@ -6,7 +6,7 @@ package relayserver import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/feature/taildrop/localapi.go b/feature/taildrop/localapi.go index 8a3904f9f..c6dc13474 100644 --- a/feature/taildrop/localapi.go +++ b/feature/taildrop/localapi.go @@ -6,7 +6,7 @@ package taildrop import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "maps" diff --git a/feature/taildrop/peerapi.go b/feature/taildrop/peerapi.go index b75ce33b8..65710b7b9 100644 --- a/feature/taildrop/peerapi.go +++ b/feature/taildrop/peerapi.go @@ -4,7 +4,7 @@ package taildrop import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "net/http" diff --git a/feature/tpm/tpm.go b/feature/tpm/tpm.go index 9499ed02a..57a8f72fb 100644 --- a/feature/tpm/tpm.go +++ b/feature/tpm/tpm.go @@ -7,7 +7,7 @@ package tpm import ( "bytes" "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "iter" diff --git a/feature/tpm/tpm_test.go b/feature/tpm/tpm_test.go index f4497f8c7..25fcf2bcb 100644 --- a/feature/tpm/tpm_test.go +++ b/feature/tpm/tpm_test.go @@ -6,7 +6,7 @@ package tpm import ( "bytes" "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "iter" diff --git a/feature/wakeonlan/wakeonlan.go b/feature/wakeonlan/wakeonlan.go index 96c424084..c55bd9364 100644 --- a/feature/wakeonlan/wakeonlan.go +++ b/feature/wakeonlan/wakeonlan.go @@ -5,7 +5,7 @@ package wakeonlan import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "log" "net" "net/http" diff --git a/gokrazy/build.go b/gokrazy/build.go index c1ee1cbeb..85264900c 100644 --- a/gokrazy/build.go +++ b/gokrazy/build.go @@ -11,7 +11,7 @@ package main import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/hostinfo/hostinfo_test.go b/hostinfo/hostinfo_test.go index 15b6971b6..1c18628fc 100644 --- a/hostinfo/hostinfo_test.go +++ b/hostinfo/hostinfo_test.go @@ -4,7 +4,7 @@ package hostinfo import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "os" "strings" "testing" diff --git a/internal/client/tailscale/vip_service.go b/internal/client/tailscale/vip_service.go index 64fcfdf5e..000dab98b 100644 --- a/internal/client/tailscale/vip_service.go +++ b/internal/client/tailscale/vip_service.go @@ -6,7 +6,7 @@ package tailscale import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/http" diff --git a/internal/noiseconn/conn.go b/internal/noiseconn/conn.go index 7476b7ecc..6715b7b2c 100644 --- a/internal/noiseconn/conn.go +++ b/internal/noiseconn/conn.go @@ -12,7 +12,7 @@ import ( "bytes" "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "io" "net/http" diff --git a/ipn/auditlog/auditlog.go b/ipn/auditlog/auditlog.go index 0460bc4e2..19df09539 100644 --- a/ipn/auditlog/auditlog.go +++ b/ipn/auditlog/auditlog.go @@ -6,7 +6,7 @@ package auditlog import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "sort" diff --git a/ipn/conffile/conffile.go b/ipn/conffile/conffile.go index a2bafb8b7..3fa2331d0 100644 --- a/ipn/conffile/conffile.go +++ b/ipn/conffile/conffile.go @@ -7,7 +7,7 @@ package conffile import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "os" diff --git a/ipn/ipn_view.go b/ipn/ipn_view.go index 1d31ced9d..b93272fed 100644 --- a/ipn/ipn_view.go +++ b/ipn/ipn_view.go @@ -6,7 +6,7 @@ package ipn import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" diff --git a/ipn/ipnauth/actor.go b/ipn/ipnauth/actor.go index 108bdd341..58b40a355 100644 --- a/ipn/ipnauth/actor.go +++ b/ipn/ipnauth/actor.go @@ -5,7 +5,7 @@ package ipnauth import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "tailscale.com/client/tailscale/apitype" diff --git a/ipn/ipnlocal/c2n.go b/ipn/ipnlocal/c2n.go index 4b91c3cb9..f7baf3acc 100644 --- a/ipn/ipnlocal/c2n.go +++ b/ipn/ipnlocal/c2n.go @@ -5,7 +5,7 @@ package ipnlocal import ( "crypto/x509" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/ipn/ipnlocal/c2n_test.go b/ipn/ipnlocal/c2n_test.go index cc31e284a..90a777996 100644 --- a/ipn/ipnlocal/c2n_test.go +++ b/ipn/ipnlocal/c2n_test.go @@ -6,7 +6,7 @@ package ipnlocal import ( "cmp" "crypto/x509" - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/http/httptest" "net/url" "os" diff --git a/ipn/ipnlocal/cert.go b/ipn/ipnlocal/cert.go index 86052eb8d..17f9d1588 100644 --- a/ipn/ipnlocal/cert.go +++ b/ipn/ipnlocal/cert.go @@ -16,7 +16,7 @@ import ( "crypto/tls" "crypto/x509" "crypto/x509/pkix" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/ipn/ipnlocal/dnsconfig_test.go b/ipn/ipnlocal/dnsconfig_test.go index c0f5b25f3..7cd737358 100644 --- a/ipn/ipnlocal/dnsconfig_test.go +++ b/ipn/ipnlocal/dnsconfig_test.go @@ -5,7 +5,7 @@ package ipnlocal import ( "cmp" - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/netip" "reflect" "testing" diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 4ed012f2e..899c688c2 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -12,7 +12,7 @@ import ( "crypto/sha256" "encoding/base64" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ipn/ipnlocal/local_test.go b/ipn/ipnlocal/local_test.go index 0b39c45c2..91ac23814 100644 --- a/ipn/ipnlocal/local_test.go +++ b/ipn/ipnlocal/local_test.go @@ -6,7 +6,7 @@ package ipnlocal import ( "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "maps" diff --git a/ipn/ipnlocal/network-lock.go b/ipn/ipnlocal/network-lock.go index 10f0cc827..c3717ae9c 100644 --- a/ipn/ipnlocal/network-lock.go +++ b/ipn/ipnlocal/network-lock.go @@ -10,7 +10,7 @@ import ( "crypto/rand" "encoding/base64" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ipn/ipnlocal/network-lock_test.go b/ipn/ipnlocal/network-lock_test.go index 838f16cb9..856678f19 100644 --- a/ipn/ipnlocal/network-lock_test.go +++ b/ipn/ipnlocal/network-lock_test.go @@ -6,7 +6,7 @@ package ipnlocal import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net" "net/http" diff --git a/ipn/ipnlocal/peerapi.go b/ipn/ipnlocal/peerapi.go index 89554f0ff..b1874e1b8 100644 --- a/ipn/ipnlocal/peerapi.go +++ b/ipn/ipnlocal/peerapi.go @@ -6,7 +6,7 @@ package ipnlocal import ( "context" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "hash/crc32" diff --git a/ipn/ipnlocal/peerapi_test.go b/ipn/ipnlocal/peerapi_test.go index d8655afa0..0210b70cf 100644 --- a/ipn/ipnlocal/peerapi_test.go +++ b/ipn/ipnlocal/peerapi_test.go @@ -5,7 +5,7 @@ package ipnlocal import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/http" "net/http/httptest" "net/netip" diff --git a/ipn/ipnlocal/profiles.go b/ipn/ipnlocal/profiles.go index 1d312cfa6..d04cf94ce 100644 --- a/ipn/ipnlocal/profiles.go +++ b/ipn/ipnlocal/profiles.go @@ -6,7 +6,7 @@ package ipnlocal import ( "cmp" "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "runtime" diff --git a/ipn/ipnlocal/serve.go b/ipn/ipnlocal/serve.go index 44d63fe54..17937fead 100644 --- a/ipn/ipnlocal/serve.go +++ b/ipn/ipnlocal/serve.go @@ -8,7 +8,7 @@ import ( "crypto/sha256" "crypto/tls" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ipn/ipnlocal/serve_test.go b/ipn/ipnlocal/serve_test.go index 57d1a4745..378d358bd 100644 --- a/ipn/ipnlocal/serve_test.go +++ b/ipn/ipnlocal/serve_test.go @@ -10,7 +10,7 @@ import ( "crypto/sha256" "crypto/tls" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/http" diff --git a/ipn/ipnlocal/ssh_test.go b/ipn/ipnlocal/ssh_test.go index 6e93b34f0..0a029310d 100644 --- a/ipn/ipnlocal/ssh_test.go +++ b/ipn/ipnlocal/ssh_test.go @@ -6,7 +6,7 @@ package ipnlocal import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "reflect" "testing" diff --git a/ipn/ipnlocal/web_client.go b/ipn/ipnlocal/web_client.go index 18145d1bb..fa7297421 100644 --- a/ipn/ipnlocal/web_client.go +++ b/ipn/ipnlocal/web_client.go @@ -7,7 +7,7 @@ package ipnlocal import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ipn/ipnserver/server.go b/ipn/ipnserver/server.go index a7ded9c00..b853555e3 100644 --- a/ipn/ipnserver/server.go +++ b/ipn/ipnserver/server.go @@ -8,7 +8,7 @@ package ipnserver import ( "context" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ipn/localapi/debugderp.go b/ipn/localapi/debugderp.go index 6636fd253..55b762688 100644 --- a/ipn/localapi/debugderp.go +++ b/ipn/localapi/debugderp.go @@ -7,7 +7,7 @@ import ( "cmp" "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net" "net/http" diff --git a/ipn/localapi/localapi.go b/ipn/localapi/localapi.go index cd59c54e0..30627d2dd 100644 --- a/ipn/localapi/localapi.go +++ b/ipn/localapi/localapi.go @@ -10,7 +10,7 @@ import ( "context" "crypto/sha256" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ipn/localapi/localapi_test.go b/ipn/localapi/localapi_test.go index 970f798d0..15037e6e6 100644 --- a/ipn/localapi/localapi_test.go +++ b/ipn/localapi/localapi_test.go @@ -6,7 +6,7 @@ package localapi import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "go/ast" diff --git a/ipn/prefs.go b/ipn/prefs.go index 71a80b182..b59309155 100644 --- a/ipn/prefs.go +++ b/ipn/prefs.go @@ -5,7 +5,7 @@ package ipn import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "log" diff --git a/ipn/prefs_test.go b/ipn/prefs_test.go index 43e360c6a..8f5262c2b 100644 --- a/ipn/prefs_test.go +++ b/ipn/prefs_test.go @@ -4,7 +4,7 @@ package ipn import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/netip" diff --git a/ipn/store/kubestore/store_kube_test.go b/ipn/store/kubestore/store_kube_test.go index 0d709264e..14254224f 100644 --- a/ipn/store/kubestore/store_kube_test.go +++ b/ipn/store/kubestore/store_kube_test.go @@ -6,7 +6,7 @@ package kubestore import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "strings" "testing" diff --git a/ipn/store/mem/store_mem.go b/ipn/store/mem/store_mem.go index 6f474ce99..2db63b182 100644 --- a/ipn/store/mem/store_mem.go +++ b/ipn/store/mem/store_mem.go @@ -6,7 +6,7 @@ package mem import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "sync" xmaps "golang.org/x/exp/maps" diff --git a/ipn/store/stores.go b/ipn/store/stores.go index bf175da41..35b83f59a 100644 --- a/ipn/store/stores.go +++ b/ipn/store/stores.go @@ -6,7 +6,7 @@ package store import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "iter" diff --git a/jsondb/db.go b/jsondb/db.go index 68bb05af4..25a3727b5 100644 --- a/jsondb/db.go +++ b/jsondb/db.go @@ -6,7 +6,7 @@ package jsondb import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "io/fs" "os" diff --git a/k8s-operator/sessionrecording/fakes/fakes.go b/k8s-operator/sessionrecording/fakes/fakes.go index 94853df19..e725d2e8c 100644 --- a/k8s-operator/sessionrecording/fakes/fakes.go +++ b/k8s-operator/sessionrecording/fakes/fakes.go @@ -9,7 +9,7 @@ package fakes import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "math/rand" "net" diff --git a/k8s-operator/sessionrecording/spdy/conn.go b/k8s-operator/sessionrecording/spdy/conn.go index 9fefca11f..46fecb9ac 100644 --- a/k8s-operator/sessionrecording/spdy/conn.go +++ b/k8s-operator/sessionrecording/spdy/conn.go @@ -11,7 +11,7 @@ import ( "bytes" "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net" "net/http" diff --git a/k8s-operator/sessionrecording/spdy/conn_test.go b/k8s-operator/sessionrecording/spdy/conn_test.go index 3c1cb8427..e1281012d 100644 --- a/k8s-operator/sessionrecording/spdy/conn_test.go +++ b/k8s-operator/sessionrecording/spdy/conn_test.go @@ -7,7 +7,7 @@ package spdy import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "reflect" "testing" diff --git a/k8s-operator/sessionrecording/tsrecorder/tsrecorder.go b/k8s-operator/sessionrecording/tsrecorder/tsrecorder.go index a5bdf7ddd..f80549b19 100644 --- a/k8s-operator/sessionrecording/tsrecorder/tsrecorder.go +++ b/k8s-operator/sessionrecording/tsrecorder/tsrecorder.go @@ -7,7 +7,7 @@ package tsrecorder import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "sync" diff --git a/k8s-operator/sessionrecording/ws/conn.go b/k8s-operator/sessionrecording/ws/conn.go index 0d8aefaac..abc301296 100644 --- a/k8s-operator/sessionrecording/ws/conn.go +++ b/k8s-operator/sessionrecording/ws/conn.go @@ -10,7 +10,7 @@ package ws import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/kube/egressservices/egressservices.go b/kube/egressservices/egressservices.go index 2515f1bf3..e6765ce06 100644 --- a/kube/egressservices/egressservices.go +++ b/kube/egressservices/egressservices.go @@ -9,7 +9,7 @@ package egressservices import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/netip" ) diff --git a/kube/egressservices/egressservices_test.go b/kube/egressservices/egressservices_test.go index 806ad91be..7e289623f 100644 --- a/kube/egressservices/egressservices_test.go +++ b/kube/egressservices/egressservices_test.go @@ -4,7 +4,7 @@ package egressservices import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" "github.com/google/go-cmp/cmp" diff --git a/kube/k8s-proxy/conf/conf.go b/kube/k8s-proxy/conf/conf.go index 8882360c5..f99dbb808 100644 --- a/kube/k8s-proxy/conf/conf.go +++ b/kube/k8s-proxy/conf/conf.go @@ -8,7 +8,7 @@ package conf import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/netip" "os" diff --git a/kube/kubeclient/client.go b/kube/kubeclient/client.go index 332b21106..16d91cafa 100644 --- a/kube/kubeclient/client.go +++ b/kube/kubeclient/client.go @@ -14,7 +14,7 @@ import ( "context" "crypto/tls" "crypto/x509" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "log" diff --git a/kube/kubeclient/client_test.go b/kube/kubeclient/client_test.go index 31878befe..ffefafe78 100644 --- a/kube/kubeclient/client_test.go +++ b/kube/kubeclient/client_test.go @@ -5,7 +5,7 @@ package kubeclient import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/http" "testing" diff --git a/kube/state/state.go b/kube/state/state.go index 4831a5f5b..8fc600103 100644 --- a/kube/state/state.go +++ b/kube/state/state.go @@ -11,7 +11,7 @@ package state import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "tailscale.com/ipn" diff --git a/log/sockstatlog/logger.go b/log/sockstatlog/logger.go index 3cc27c22d..dd2d8f8c8 100644 --- a/log/sockstatlog/logger.go +++ b/log/sockstatlog/logger.go @@ -9,7 +9,7 @@ package sockstatlog import ( "context" "crypto/sha256" - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "net/http" "os" diff --git a/logpolicy/logpolicy.go b/logpolicy/logpolicy.go index f5c475712..568de2dea 100644 --- a/logpolicy/logpolicy.go +++ b/logpolicy/logpolicy.go @@ -11,7 +11,7 @@ import ( "bytes" "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/logtail/example/logreprocess/logreprocess.go b/logtail/example/logreprocess/logreprocess.go index aae65df9f..41b67e88b 100644 --- a/logtail/example/logreprocess/logreprocess.go +++ b/logtail/example/logreprocess/logreprocess.go @@ -6,7 +6,7 @@ package main import ( "bufio" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "io" "log" diff --git a/logtail/logtail_test.go b/logtail/logtail_test.go index b8c46c448..3535e3fe4 100644 --- a/logtail/logtail_test.go +++ b/logtail/logtail_test.go @@ -6,7 +6,7 @@ package logtail import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "net/http" "net/http/httptest" diff --git a/metrics/multilabelmap_test.go b/metrics/multilabelmap_test.go index 195696234..d319c822d 100644 --- a/metrics/multilabelmap_test.go +++ b/metrics/multilabelmap_test.go @@ -5,7 +5,7 @@ package metrics import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "expvar" "fmt" "io" diff --git a/net/dns/resolver/tsdns_test.go b/net/dns/resolver/tsdns_test.go index 4bbfd4d6a..caa89490c 100644 --- a/net/dns/resolver/tsdns_test.go +++ b/net/dns/resolver/tsdns_test.go @@ -7,7 +7,7 @@ import ( "bytes" "context" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "log" diff --git a/net/dnsfallback/dnsfallback.go b/net/dnsfallback/dnsfallback.go index 8e53c3b29..a1ad7a142 100644 --- a/net/dnsfallback/dnsfallback.go +++ b/net/dnsfallback/dnsfallback.go @@ -13,7 +13,7 @@ package dnsfallback import ( "context" _ "embed" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net" diff --git a/net/dnsfallback/dnsfallback_test.go b/net/dnsfallback/dnsfallback_test.go index 7f8810574..30aacc983 100644 --- a/net/dnsfallback/dnsfallback_test.go +++ b/net/dnsfallback/dnsfallback_test.go @@ -5,7 +5,7 @@ package dnsfallback import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "os" "path/filepath" diff --git a/net/dnsfallback/update-dns-fallbacks.go b/net/dnsfallback/update-dns-fallbacks.go index 384e77e10..f91f433d8 100644 --- a/net/dnsfallback/update-dns-fallbacks.go +++ b/net/dnsfallback/update-dns-fallbacks.go @@ -6,7 +6,7 @@ package main import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "net/http" diff --git a/net/flowtrack/flowtrack.go b/net/flowtrack/flowtrack.go index 8b3d799f7..2421f7508 100644 --- a/net/flowtrack/flowtrack.go +++ b/net/flowtrack/flowtrack.go @@ -11,7 +11,7 @@ package flowtrack import ( "container/list" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/netip" diff --git a/net/flowtrack/flowtrack_test.go b/net/flowtrack/flowtrack_test.go index 1a13f7753..9589aeb94 100644 --- a/net/flowtrack/flowtrack_test.go +++ b/net/flowtrack/flowtrack_test.go @@ -4,7 +4,7 @@ package flowtrack import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/netip" "testing" diff --git a/net/netmon/interfaces_test.go b/net/netmon/interfaces_test.go index e4274819f..0ea43d1f1 100644 --- a/net/netmon/interfaces_test.go +++ b/net/netmon/interfaces_test.go @@ -4,7 +4,7 @@ package netmon import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "net" "net/netip" "testing" diff --git a/net/netmon/netmon.go b/net/netmon/netmon.go index 3f825bc97..8715112ac 100644 --- a/net/netmon/netmon.go +++ b/net/netmon/netmon.go @@ -7,7 +7,7 @@ package netmon import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" "runtime" diff --git a/net/speedtest/speedtest_client.go b/net/speedtest/speedtest_client.go index 299a12a8d..2c6d1e9c3 100644 --- a/net/speedtest/speedtest_client.go +++ b/net/speedtest/speedtest_client.go @@ -4,7 +4,7 @@ package speedtest import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net" "time" diff --git a/net/speedtest/speedtest_server.go b/net/speedtest/speedtest_server.go index 9dd78b195..391b91257 100644 --- a/net/speedtest/speedtest_server.go +++ b/net/speedtest/speedtest_server.go @@ -5,7 +5,7 @@ package speedtest import ( "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/net/udprelay/endpoint/endpoint_test.go b/net/udprelay/endpoint/endpoint_test.go index f12a6e2f6..929f1dc26 100644 --- a/net/udprelay/endpoint/endpoint_test.go +++ b/net/udprelay/endpoint/endpoint_test.go @@ -4,7 +4,7 @@ package endpoint import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "math" "net/netip" "testing" diff --git a/portlist/netstat_test.go b/portlist/netstat_test.go index 023b75b79..83a947615 100644 --- a/portlist/netstat_test.go +++ b/portlist/netstat_test.go @@ -7,7 +7,7 @@ package portlist import ( "bufio" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "strings" "testing" diff --git a/prober/derp.go b/prober/derp.go index c7a82317d..8e66b7210 100644 --- a/prober/derp.go +++ b/prober/derp.go @@ -9,7 +9,7 @@ import ( "context" crand "crypto/rand" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "expvar" "fmt" diff --git a/prober/derp_test.go b/prober/derp_test.go index 93b8d760b..5502ff202 100644 --- a/prober/derp_test.go +++ b/prober/derp_test.go @@ -7,7 +7,7 @@ import ( "context" "crypto/sha256" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "net" "net/http" "net/http/httptest" diff --git a/prober/prober.go b/prober/prober.go index 1237611f4..94b706110 100644 --- a/prober/prober.go +++ b/prober/prober.go @@ -10,7 +10,7 @@ import ( "cmp" "container/ring" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "hash/fnv" "log" diff --git a/prober/prober_test.go b/prober/prober_test.go index 21c975a73..403f7a98d 100644 --- a/prober/prober_test.go +++ b/prober/prober_test.go @@ -5,7 +5,7 @@ package prober import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/sessionrecording/connect.go b/sessionrecording/connect.go index dc697d071..b37982f56 100644 --- a/sessionrecording/connect.go +++ b/sessionrecording/connect.go @@ -8,7 +8,7 @@ package sessionrecording import ( "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/sessionrecording/connect_test.go b/sessionrecording/connect_test.go index c0fcf6d40..2d0cea086 100644 --- a/sessionrecording/connect_test.go +++ b/sessionrecording/connect_test.go @@ -8,7 +8,7 @@ import ( "context" "crypto/rand" "crypto/sha256" - "encoding/json" + "github.com/go-json-experiment/json/v1" "io" "net" "net/http" diff --git a/ssh/tailssh/incubator.go b/ssh/tailssh/incubator.go index 9e1a9ea94..85b416f4f 100644 --- a/ssh/tailssh/incubator.go +++ b/ssh/tailssh/incubator.go @@ -13,7 +13,7 @@ package tailssh import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/ssh/tailssh/incubator_plan9.go b/ssh/tailssh/incubator_plan9.go index 61b6a54eb..60a3903f9 100644 --- a/ssh/tailssh/incubator_plan9.go +++ b/ssh/tailssh/incubator_plan9.go @@ -10,7 +10,7 @@ package tailssh import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/ssh/tailssh/privs_test.go b/ssh/tailssh/privs_test.go index 32b219a77..bdf70eb1c 100644 --- a/ssh/tailssh/privs_test.go +++ b/ssh/tailssh/privs_test.go @@ -6,7 +6,7 @@ package tailssh import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "os" "os/exec" diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go index b249a1063..39f934012 100644 --- a/ssh/tailssh/tailssh.go +++ b/ssh/tailssh/tailssh.go @@ -10,7 +10,7 @@ import ( "bytes" "context" "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/ssh/tailssh/tailssh_test.go b/ssh/tailssh/tailssh_test.go index 96fb87f49..b0367757f 100644 --- a/ssh/tailssh/tailssh_test.go +++ b/ssh/tailssh/tailssh_test.go @@ -12,7 +12,7 @@ import ( "crypto/ed25519" "crypto/elliptic" "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/syncs/shardedint.go b/syncs/shardedint.go index 28c4168d5..aef23f2a2 100644 --- a/syncs/shardedint.go +++ b/syncs/shardedint.go @@ -4,7 +4,7 @@ package syncs import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "strconv" "sync/atomic" diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 53c4683c1..e490455a8 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -10,7 +10,7 @@ package tailcfg import ( "bytes" "cmp" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "maps" diff --git a/tailcfg/tailcfg_test.go b/tailcfg/tailcfg_test.go index e8e86cdb1..a77314fe9 100644 --- a/tailcfg/tailcfg_test.go +++ b/tailcfg/tailcfg_test.go @@ -4,7 +4,7 @@ package tailcfg_test import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/netip" "os" "reflect" diff --git a/tailcfg/tailcfg_view.go b/tailcfg/tailcfg_view.go index 7e82cd871..3cc42c877 100644 --- a/tailcfg/tailcfg_view.go +++ b/tailcfg/tailcfg_view.go @@ -6,7 +6,7 @@ package tailcfg import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" "time" diff --git a/tempfork/acme/acme.go b/tempfork/acme/acme.go index bbddb9551..f8a47c9f5 100644 --- a/tempfork/acme/acme.go +++ b/tempfork/acme/acme.go @@ -32,7 +32,7 @@ import ( "encoding/asn1" "encoding/base64" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/tempfork/acme/acme_test.go b/tempfork/acme/acme_test.go index f0c45aea9..1818fef99 100644 --- a/tempfork/acme/acme_test.go +++ b/tempfork/acme/acme_test.go @@ -14,7 +14,7 @@ import ( "crypto/x509/pkix" "encoding/base64" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "fmt" "io" diff --git a/tempfork/acme/http.go b/tempfork/acme/http.go index d92ff232f..9772a02c0 100644 --- a/tempfork/acme/http.go +++ b/tempfork/acme/http.go @@ -9,7 +9,7 @@ import ( "context" "crypto" "crypto/rand" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/tempfork/acme/jws.go b/tempfork/acme/jws.go index b38828d85..48730a719 100644 --- a/tempfork/acme/jws.go +++ b/tempfork/acme/jws.go @@ -14,7 +14,7 @@ import ( _ "crypto/sha512" // need for EC keys "encoding/asn1" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "math/big" diff --git a/tempfork/acme/jws_test.go b/tempfork/acme/jws_test.go index d5f00ba2d..dbad7db5e 100644 --- a/tempfork/acme/jws_test.go +++ b/tempfork/acme/jws_test.go @@ -12,7 +12,7 @@ import ( "crypto/sha256" "crypto/x509" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "fmt" "io" diff --git a/tempfork/acme/rfc8555.go b/tempfork/acme/rfc8555.go index 3eaf935fd..cf0c30925 100644 --- a/tempfork/acme/rfc8555.go +++ b/tempfork/acme/rfc8555.go @@ -9,7 +9,7 @@ import ( "crypto" "crypto/x509" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/tempfork/acme/rfc8555_test.go b/tempfork/acme/rfc8555_test.go index ec51a7a5e..199ebed42 100644 --- a/tempfork/acme/rfc8555_test.go +++ b/tempfork/acme/rfc8555_test.go @@ -13,7 +13,7 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/base64" - "encoding/json" + "github.com/go-json-experiment/json/v1" "encoding/pem" "errors" "fmt" diff --git a/tempfork/acme/types.go b/tempfork/acme/types.go index 0142469d8..94c652040 100644 --- a/tempfork/acme/types.go +++ b/tempfork/acme/types.go @@ -7,7 +7,7 @@ package acme import ( "crypto" "crypto/x509" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "net/http" diff --git a/tsconsensus/http.go b/tsconsensus/http.go index d2a44015f..35e6b4ef9 100644 --- a/tsconsensus/http.go +++ b/tsconsensus/http.go @@ -6,7 +6,7 @@ package tsconsensus import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/tsconsensus/monitor.go b/tsconsensus/monitor.go index 61a5a74a0..ac370bb68 100644 --- a/tsconsensus/monitor.go +++ b/tsconsensus/monitor.go @@ -5,7 +5,7 @@ package tsconsensus import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "log" diff --git a/tsconsensus/tsconsensus.go b/tsconsensus/tsconsensus.go index b6bf37310..e169d1212 100644 --- a/tsconsensus/tsconsensus.go +++ b/tsconsensus/tsconsensus.go @@ -25,7 +25,7 @@ package tsconsensus import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "log" diff --git a/tsconsensus/tsconsensus_test.go b/tsconsensus/tsconsensus_test.go index bfb6b3e06..fc4f3bc48 100644 --- a/tsconsensus/tsconsensus_test.go +++ b/tsconsensus/tsconsensus_test.go @@ -7,7 +7,7 @@ import ( "bufio" "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/tsnet/depaware.txt b/tsnet/depaware.txt index da3175b8c..b6c89ed2d 100644 --- a/tsnet/depaware.txt +++ b/tsnet/depaware.txt @@ -101,6 +101,7 @@ tailscale.com/tsnet dependencies: (generated by github.com/tailscale/depaware) 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/go-json-experiment/json/v1 from tailscale.com/client/local+ 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/tstest/deptest/deptest.go b/tstest/deptest/deptest.go index 4effd4a78..9717383b9 100644 --- a/tstest/deptest/deptest.go +++ b/tstest/deptest/deptest.go @@ -7,7 +7,7 @@ package deptest import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "os" "os/exec" "path/filepath" diff --git a/tstest/integration/gen_deps.go b/tstest/integration/gen_deps.go index 23bb95ee5..47aff112d 100644 --- a/tstest/integration/gen_deps.go +++ b/tstest/integration/gen_deps.go @@ -7,7 +7,7 @@ package main import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "log" "os" diff --git a/tstest/integration/integration.go b/tstest/integration/integration.go index 987bb569a..841289798 100644 --- a/tstest/integration/integration.go +++ b/tstest/integration/integration.go @@ -11,7 +11,7 @@ import ( "bytes" "context" "crypto/tls" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "io" diff --git a/tstest/integration/integration_test.go b/tstest/integration/integration_test.go index 7cb251f31..81f1d5044 100644 --- a/tstest/integration/integration_test.go +++ b/tstest/integration/integration_test.go @@ -8,7 +8,7 @@ package integration import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "flag" "fmt" diff --git a/tstest/integration/testcontrol/testcontrol.go b/tstest/integration/testcontrol/testcontrol.go index 71205f897..22826341c 100644 --- a/tstest/integration/testcontrol/testcontrol.go +++ b/tstest/integration/testcontrol/testcontrol.go @@ -9,7 +9,7 @@ import ( "cmp" "context" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/tstest/integration/vms/distros.go b/tstest/integration/vms/distros.go index ca2bf53ba..4f32d631e 100644 --- a/tstest/integration/vms/distros.go +++ b/tstest/integration/vms/distros.go @@ -5,7 +5,7 @@ package vms import ( _ "embed" - "encoding/json" + "github.com/go-json-experiment/json/v1" "log" "github.com/tailscale/hujson" diff --git a/tstest/integration/vms/dns_tester.go b/tstest/integration/vms/dns_tester.go index 50b39bb5f..edd1298b0 100644 --- a/tstest/integration/vms/dns_tester.go +++ b/tstest/integration/vms/dns_tester.go @@ -11,7 +11,7 @@ package main import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "net" "os" diff --git a/tstest/integration/vms/opensuse_leap_15_1_test.go b/tstest/integration/vms/opensuse_leap_15_1_test.go index 7d3ac579e..d35d1d043 100644 --- a/tstest/integration/vms/opensuse_leap_15_1_test.go +++ b/tstest/integration/vms/opensuse_leap_15_1_test.go @@ -6,7 +6,7 @@ package vms import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "os" "path/filepath" "testing" diff --git a/tstest/iosdeps/iosdeps.go b/tstest/iosdeps/iosdeps.go index f414f53df..bacaf21be 100644 --- a/tstest/iosdeps/iosdeps.go +++ b/tstest/iosdeps/iosdeps.go @@ -12,7 +12,7 @@ import ( _ "context" _ "crypto/rand" _ "crypto/sha256" - _ "encoding/json" + _ "github.com/go-json-experiment/json/v1" _ "errors" _ "fmt" _ "io" diff --git a/tstest/jsdeps/jsdeps.go b/tstest/jsdeps/jsdeps.go index 1d188152f..938bee1ae 100644 --- a/tstest/jsdeps/jsdeps.go +++ b/tstest/jsdeps/jsdeps.go @@ -11,7 +11,7 @@ import ( _ "bytes" _ "context" _ "encoding/hex" - _ "encoding/json" + _ "github.com/go-json-experiment/json/v1" _ "fmt" _ "log" _ "math/rand/v2" diff --git a/tstest/mts/mts.go b/tstest/mts/mts.go index c10d69d8d..2bab2bd91 100644 --- a/tstest/mts/mts.go +++ b/tstest/mts/mts.go @@ -11,7 +11,7 @@ package main import ( "bufio" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "io" diff --git a/tstest/natlab/vnet/vnet.go b/tstest/natlab/vnet/vnet.go index 1fa170d87..3fd3eccdc 100644 --- a/tstest/natlab/vnet/vnet.go +++ b/tstest/natlab/vnet/vnet.go @@ -16,7 +16,7 @@ import ( "context" "crypto/tls" "encoding/binary" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/tstime/mono/mono_test.go b/tstime/mono/mono_test.go index 67a8614ba..8a29b6c94 100644 --- a/tstime/mono/mono_test.go +++ b/tstime/mono/mono_test.go @@ -4,7 +4,7 @@ package mono import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" "time" ) diff --git a/tstime/rate/value.go b/tstime/rate/value.go index 610f06bbd..6c250d1c6 100644 --- a/tstime/rate/value.go +++ b/tstime/rate/value.go @@ -4,7 +4,7 @@ package rate import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "math" "sync" @@ -184,7 +184,7 @@ func (r *Value) normalizedIntegral() float64 { } type jsonValue struct { - // TODO: Use v2 "encoding/json" for native time.Duration formatting. + // TODO: Use v2 "github.com/go-json-experiment/json/v1" for native time.Duration formatting. HalfLife string `json:"halfLife,omitempty,omitzero"` Value float64 `json:"value,omitempty,omitzero"` Updated mono.Time `json:"updated,omitempty,omitzero"` diff --git a/tstime/tstime_test.go b/tstime/tstime_test.go index 556ad4e8b..68164af7b 100644 --- a/tstime/tstime_test.go +++ b/tstime/tstime_test.go @@ -4,7 +4,7 @@ package tstime import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" "time" diff --git a/tsweb/log.go b/tsweb/log.go index 51f95e95f..70dfa49e1 100644 --- a/tsweb/log.go +++ b/tsweb/log.go @@ -4,7 +4,7 @@ package tsweb import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "strings" "time" ) diff --git a/types/appctype/appconnector_test.go b/types/appctype/appconnector_test.go index 390d1776a..2d8fbc42a 100644 --- a/types/appctype/appconnector_test.go +++ b/types/appctype/appconnector_test.go @@ -4,7 +4,7 @@ package appctype import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "net/netip" "strings" "testing" diff --git a/types/dnstype/dnstype_view.go b/types/dnstype/dnstype_view.go index c77ff9a40..c15b1588d 100644 --- a/types/dnstype/dnstype_view.go +++ b/types/dnstype/dnstype_view.go @@ -6,7 +6,7 @@ package dnstype import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" diff --git a/types/ipproto/ipproto_test.go b/types/ipproto/ipproto_test.go index 102b79cff..c2dce3921 100644 --- a/types/ipproto/ipproto_test.go +++ b/types/ipproto/ipproto_test.go @@ -5,7 +5,7 @@ package ipproto import ( "encoding" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "testing" diff --git a/types/key/control.go b/types/key/control.go index 96021249b..970d91abb 100644 --- a/types/key/control.go +++ b/types/key/control.go @@ -3,7 +3,7 @@ package key -import "encoding/json" +import "github.com/go-json-experiment/json/v1" // ControlPrivate is a Tailscale control plane private key. // diff --git a/types/key/control_test.go b/types/key/control_test.go index a98a586f3..a40dfc37a 100644 --- a/types/key/control_test.go +++ b/types/key/control_test.go @@ -4,7 +4,7 @@ package key import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" ) diff --git a/types/key/derp.go b/types/key/derp.go index 1466b85bc..2c5d10100 100644 --- a/types/key/derp.go +++ b/types/key/derp.go @@ -6,7 +6,7 @@ package key import ( "crypto/subtle" "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "strings" diff --git a/types/key/disco_test.go b/types/key/disco_test.go index c62c13cbf..be7b64d0e 100644 --- a/types/key/disco_test.go +++ b/types/key/disco_test.go @@ -5,7 +5,7 @@ package key import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" ) diff --git a/types/key/machine_test.go b/types/key/machine_test.go index 157df9e43..90dafef75 100644 --- a/types/key/machine_test.go +++ b/types/key/machine_test.go @@ -5,7 +5,7 @@ package key import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "strings" "testing" ) diff --git a/types/key/node_test.go b/types/key/node_test.go index 80a2dadf9..8ecd3afb5 100644 --- a/types/key/node_test.go +++ b/types/key/node_test.go @@ -6,7 +6,7 @@ package key import ( "bufio" "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "strings" "testing" ) diff --git a/types/logger/logger.go b/types/logger/logger.go index 6c4edf633..9c4678c51 100644 --- a/types/logger/logger.go +++ b/types/logger/logger.go @@ -10,7 +10,7 @@ import ( "bufio" "bytes" "container/list" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "log" diff --git a/types/netlogtype/netlogtype_test.go b/types/netlogtype/netlogtype_test.go index 7f29090c5..bfe437f66 100644 --- a/types/netlogtype/netlogtype_test.go +++ b/types/netlogtype/netlogtype_test.go @@ -4,7 +4,7 @@ package netlogtype import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "math" "net/netip" "testing" diff --git a/types/netmap/netmap.go b/types/netmap/netmap.go index 963f80a44..0ed50724f 100644 --- a/types/netmap/netmap.go +++ b/types/netmap/netmap.go @@ -6,7 +6,7 @@ package netmap import ( "cmp" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/netip" "sort" diff --git a/types/opt/bool_test.go b/types/opt/bool_test.go index dddbcfc19..812c5ca9b 100644 --- a/types/opt/bool_test.go +++ b/types/opt/bool_test.go @@ -4,7 +4,7 @@ package opt import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "reflect" "strings" diff --git a/types/opt/value_test.go b/types/opt/value_test.go index 890f9a579..f93f78a72 100644 --- a/types/opt/value_test.go +++ b/types/opt/value_test.go @@ -4,7 +4,7 @@ package opt import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "reflect" "testing" @@ -95,7 +95,7 @@ func TestValue(t *testing.T) { ExplicitUnset: Value[bool]{}, }, want: bools.IfElse( - // Detect whether v1 "encoding/json" supports `omitzero` or not. + // Detect whether v1 "github.com/go-json-experiment/json/v1" supports `omitzero` or not. // TODO(Go1.24): Remove this after `omitzero` is supported. string(must.Get(json.Marshal(struct { X int `json:",omitzero"` diff --git a/types/persist/persist_view.go b/types/persist/persist_view.go index 55eb40c51..8e90efe62 100644 --- a/types/persist/persist_view.go +++ b/types/persist/persist_view.go @@ -6,7 +6,7 @@ package persist import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "tailscale.com/tailcfg" diff --git a/types/prefs/prefs_example/prefs_example_view.go b/types/prefs/prefs_example/prefs_example_view.go index 9aaac6e9c..2bf5f32a9 100644 --- a/types/prefs/prefs_example/prefs_example_view.go +++ b/types/prefs/prefs_example/prefs_example_view.go @@ -6,7 +6,7 @@ package prefs_example import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" diff --git a/types/prefs/prefs_test.go b/types/prefs/prefs_test.go index d6af745bf..a762b22eb 100644 --- a/types/prefs/prefs_test.go +++ b/types/prefs/prefs_test.go @@ -5,7 +5,7 @@ package prefs import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" "reflect" diff --git a/types/prefs/prefs_view_test.go b/types/prefs/prefs_view_test.go index f6cfc918d..b94c7f665 100644 --- a/types/prefs/prefs_view_test.go +++ b/types/prefs/prefs_view_test.go @@ -6,7 +6,7 @@ package prefs import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "net/netip" ) diff --git a/types/tkatype/tkatype_test.go b/types/tkatype/tkatype_test.go index c81891b9c..90ba0b254 100644 --- a/types/tkatype/tkatype_test.go +++ b/types/tkatype/tkatype_test.go @@ -4,7 +4,7 @@ package tkatype import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" "golang.org/x/crypto/blake2s" diff --git a/types/views/views.go b/types/views/views.go index 3911f1112..11ffcd729 100644 --- a/types/views/views.go +++ b/types/views/views.go @@ -7,7 +7,7 @@ package views import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "iter" diff --git a/types/views/views_test.go b/types/views/views_test.go index 2205cbc03..0b61f011c 100644 --- a/types/views/views_test.go +++ b/types/views/views_test.go @@ -5,7 +5,7 @@ package views import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "net/netip" "reflect" diff --git a/util/cloudenv/cloudenv.go b/util/cloudenv/cloudenv.go index be60ca007..562cc245a 100644 --- a/util/cloudenv/cloudenv.go +++ b/util/cloudenv/cloudenv.go @@ -6,7 +6,7 @@ package cloudenv import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "log" "math/rand/v2" "net" diff --git a/util/expvarx/expvarx.go b/util/expvarx/expvarx.go index 762f65d06..d8dd216d9 100644 --- a/util/expvarx/expvarx.go +++ b/util/expvarx/expvarx.go @@ -5,7 +5,7 @@ package expvarx import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "expvar" "sync" "time" diff --git a/util/jsonutil/unmarshal.go b/util/jsonutil/unmarshal.go index b1eb4ea87..7eebf265e 100644 --- a/util/jsonutil/unmarshal.go +++ b/util/jsonutil/unmarshal.go @@ -8,7 +8,7 @@ package jsonutil import ( "bytes" - "encoding/json" + "github.com/go-json-experiment/json/v1" "sync" ) diff --git a/util/jsonutil/unmarshal_test.go b/util/jsonutil/unmarshal_test.go index 32f8402f0..862cb5bf4 100644 --- a/util/jsonutil/unmarshal_test.go +++ b/util/jsonutil/unmarshal_test.go @@ -4,7 +4,7 @@ package jsonutil import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "reflect" "testing" ) diff --git a/util/reload/reload.go b/util/reload/reload.go index f18f9ebd1..d7df7c23f 100644 --- a/util/reload/reload.go +++ b/util/reload/reload.go @@ -7,7 +7,7 @@ package reload import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "math/rand/v2" "os" diff --git a/util/set/set.go b/util/set/set.go index eb0697536..b00f2571b 100644 --- a/util/set/set.go +++ b/util/set/set.go @@ -5,7 +5,7 @@ package set import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "maps" ) diff --git a/util/set/set_test.go b/util/set/set_test.go index 85913ad24..c2ae0ca7b 100644 --- a/util/set/set_test.go +++ b/util/set/set_test.go @@ -4,7 +4,7 @@ package set import ( - "encoding/json" + "github.com/go-json-experiment/json/v1" "slices" "testing" ) diff --git a/util/syspolicy/setting/snapshot_test.go b/util/syspolicy/setting/snapshot_test.go index d41b362f0..1705116c8 100644 --- a/util/syspolicy/setting/snapshot_test.go +++ b/util/syspolicy/setting/snapshot_test.go @@ -5,7 +5,7 @@ package setting import ( "cmp" - "encoding/json" + "github.com/go-json-experiment/json/v1" "testing" "time" diff --git a/util/winutil/svcdiag_windows.go b/util/winutil/svcdiag_windows.go index 372377cf9..451799399 100644 --- a/util/winutil/svcdiag_windows.go +++ b/util/winutil/svcdiag_windows.go @@ -5,7 +5,7 @@ package winutil import ( "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "strings" "unsafe" diff --git a/wgengine/filter/filter_test.go b/wgengine/filter/filter_test.go index ae39eeb08..9c32667a2 100644 --- a/wgengine/filter/filter_test.go +++ b/wgengine/filter/filter_test.go @@ -5,7 +5,7 @@ package filter import ( "encoding/hex" - "encoding/json" + "github.com/go-json-experiment/json/v1" "flag" "fmt" "net/netip" diff --git a/wgengine/magicsock/relaymanager.go b/wgengine/magicsock/relaymanager.go index c8c9ed41b..cc14d5499 100644 --- a/wgengine/magicsock/relaymanager.go +++ b/wgengine/magicsock/relaymanager.go @@ -6,7 +6,7 @@ package magicsock import ( "bytes" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "errors" "fmt" "io" diff --git a/wgengine/netlog/logger.go b/wgengine/netlog/logger.go index 3a696b246..d9710987e 100644 --- a/wgengine/netlog/logger.go +++ b/wgengine/netlog/logger.go @@ -7,7 +7,7 @@ package netlog import ( "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "log" diff --git a/wgengine/router/router_windows.go b/wgengine/router/router_windows.go index 64163660d..5025366b2 100644 --- a/wgengine/router/router_windows.go +++ b/wgengine/router/router_windows.go @@ -6,7 +6,7 @@ package router import ( "bufio" "context" - "encoding/json" + "github.com/go-json-experiment/json/v1" "fmt" "io" "net/netip"