You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/tailcfg
Joe Tsai fbb91758ac
cmd/viewer, types/views: implement support for json/v2 (#16852)
This adds support for having every viewer type implement
jsonv2.MarshalerTo and jsonv2.UnmarshalerFrom.

This provides a significant boost in performance
as the json package no longer needs to validate
the entirety of the JSON value outputted by MarshalJSON,
nor does it need to identify the boundaries of a JSON value
in order to call UnmarshalJSON.

For deeply nested and recursive MarshalJSON or UnmarshalJSON calls,
this can improve runtime from O(N²) to O(N).

This still references "github.com/go-json-experiment/json"
instead of the experimental "encoding/json/v2" package
now available in Go 1.25 under goexperiment.jsonv2
so that code still builds without the experiment tag.
Of note, the "github.com/go-json-experiment/json" package
aliases the standard library under the right build conditions.

Updates tailscale/corp#791

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
4 months ago
..
c2ntypes.go ipn/ipnlocal: add VIPServices hash to return body of vip-services c2n endpoint 12 months ago
derpmap.go tailcfg: add DERPRegion.NoMeasureNoHome, deprecate+document Avoid [cap 115] 10 months ago
proto_port_range.go tailcfg: implement text encoding for ProtoPortRange 2 years ago
proto_port_range_test.go tailcfg: implement text encoding for ProtoPortRange 2 years ago
tailcfg.go control/controlknobs,tailcfg,wgengine/magicsock: deprecate NodeAttrDisableMagicSockCryptoRouting (#16818) 4 months ago
tailcfg_clone.go tailcfg: add Hostinfo.ExitNodeID to report the selected exit node (#16625) 5 months ago
tailcfg_test.go tailcfg: add Hostinfo.ExitNodeID to report the selected exit node (#16625) 5 months ago
tailcfg_view.go cmd/viewer, types/views: implement support for json/v2 (#16852) 4 months ago
tka.go tailcfg: add RPC structs for /tka/affected-sigs 3 years ago