Joe Tsai 8841fd58c9 cmd/viewer: support v2 JSON methods
This links in github.com/go-json-experiment/json into tailscaled.
After this change, the tailscaled binary on GOOS=linux and GOARCH=amd64
increases by ~85KiB.

The v2 marshal/unmarshal methods avoids a O(n^2) behavior
with deeply nested v1 MarshalJSON and UnmarshalJSON calls,
since each call requires the encoding/json package to rescan
the entire JSON value. Our data structures are not so deep
that the O(n^2) behavior becomes notable,
but this does provide about a ~20% performance benefit.

Updates tailscale/corp#14379

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-09-06 13:03:51 -07:00
..
2023-03-04 12:24:55 -08:00