diff --git a/content/docs/godoxy/Setup.mdx b/content/docs/godoxy/Setup.mdx index e3ff300..1da987a 100644 --- a/content/docs/godoxy/Setup.mdx +++ b/content/docs/godoxy/Setup.mdx @@ -27,12 +27,6 @@ To change listening ports, modify `.env`. - -`.env.example` lists optional runtime toggles. If GoDoxy crashes with **`SIGILL: illegal instruction`**, -set **`USE_SONIC_JSON=false`** in `.env` (see [Configuring GoDoxy — Runtime process environment](./getting-started/Configuring-GoDoxy#runtime-process-environment)). - - - 1. Prepare a new directory for docker compose and config files. 2. Run setup script inside the directory diff --git a/content/docs/godoxy/getting-started/Basics.mdx b/content/docs/godoxy/getting-started/Basics.mdx index c012c6f..fb26359 100644 --- a/content/docs/godoxy/getting-started/Basics.mdx +++ b/content/docs/godoxy/getting-started/Basics.mdx @@ -51,9 +51,6 @@ Doing this will make your host has only **one** exposed service, which is GoDoxy | `GODOXY_LOCAL_API_ADDR` | Local API server listening address for unauthenticated access | - | `[host]:port` | | `GODOXY_HTTP3_ENABLED` | Enable HTTP/3 | `true` | boolean | | `GODOXY_DEBUG` | Enable debug behaviors and logging | `false` | boolean | -| `USE_SONIC_JSON` | \*Use "bytedance/sonic" library for efficient JSON handling | `true ` | boolean | - -\*: For ancient CPUs you may see "SIGILL: illegal instructions" error, please set `USE_SONIC_JSON` to false . ### Authentication diff --git a/content/docs/impl/internal-homepage-integrations-qbittorrent.mdx b/content/docs/impl/internal-homepage-integrations-qbittorrent.mdx index d2a825c..af2f9bc 100644 --- a/content/docs/impl/internal-homepage-integrations-qbittorrent.mdx +++ b/content/docs/impl/internal-homepage-integrations-qbittorrent.mdx @@ -224,4 +224,4 @@ if resp.StatusCode != http.StatusOK { ## Related Packages - `internal/homepage/widgets` - Widget framework and interface -- `github.com/yusing/goutils/strings` - String utilities and JSON helpers (`MarshalJSON`, `NewJSONDecoder`; backend: sonic via `internal/serialization`) +- `github.com/yusing/goutils/strings` - String utilities and JSON helpers (`MarshalJSON`, `NewJSONDecoder`; backend: `encoding/json/v2` via `internal/serialization`) diff --git a/content/docs/impl/internal-jsonstore.mdx b/content/docs/impl/internal-jsonstore.mdx index f09936e..60b0331 100644 --- a/content/docs/impl/internal-jsonstore.mdx +++ b/content/docs/impl/internal-jsonstore.mdx @@ -364,5 +364,5 @@ if err := strutils.UnmarshalJSON(data, &tmp); err != nil { - Uses `xsync.Map` for lock-free reads - Presizes maps based on input data -- JSON via `github.com/yusing/goutils/strings` helpers (in godoxy, sonic is registered as the backend from `internal/serialization`) +- JSON via `github.com/yusing/goutils/strings` helpers (in godoxy, `encoding/json/v2` is registered as the backend from `internal/serialization`) - Background periodic save plus a save on program exit; unchanged namespaces are skipped diff --git a/content/docs/impl/internal-metrics-period.mdx b/content/docs/impl/internal-metrics-period.mdx index 0faf876..2aee033 100644 --- a/content/docs/impl/internal-metrics-period.mdx +++ b/content/docs/impl/internal-metrics-period.mdx @@ -287,7 +287,7 @@ None. | ------------------------------------------ | ------------------------ | | `github.com/gin-gonic/gin` | HTTP handling | | `github.com/yusing/goutils/http/websocket` | WebSocket streaming | -| `github.com/yusing/goutils/strings` | JSON serialization (backend: sonic via `internal/serialization`) | +| `github.com/yusing/goutils/strings` | JSON serialization (backend: `encoding/json/v2` via `internal/serialization`) | | `github.com/yusing/goutils/task` | Lifetime management | | `github.com/puzpuzpuz/xsync/v4` | Concurrent value storage | diff --git a/content/docs/impl/internal-metrics-uptime.mdx b/content/docs/impl/internal-metrics-uptime.mdx index c6c8868..ab06ee6 100644 --- a/content/docs/impl/internal-metrics-uptime.mdx +++ b/content/docs/impl/internal-metrics-uptime.mdx @@ -221,7 +221,7 @@ No explicit configuration. The poller uses period package defaults: | Dependency | Purpose | | ---------------------------------------- | ---------------- | | `github.com/lithammer/fuzzysearch/fuzzy` | Keyword matching | -| `github.com/yusing/goutils/strings` | JSON marshaling (backend: sonic via `internal/serialization`) | +| `github.com/yusing/goutils/strings` | JSON marshaling (backend: `encoding/json/v2` via `internal/serialization`) | ### Integration Points diff --git a/content/docs/impl/internal-metrics.mdx b/content/docs/impl/internal-metrics.mdx index f7dc759..c276bce 100644 --- a/content/docs/impl/internal-metrics.mdx +++ b/content/docs/impl/internal-metrics.mdx @@ -98,7 +98,7 @@ No explicit configuration. Pollers respect `common.MetricsDisable*` flags: - `github.com/shirou/gopsutil/v4` - System metrics collection - `github.com/puzpuzpuz/xsync/v4` - Atomic value storage -- `github.com/yusing/goutils/strings` - JSON serialization helpers (backend: sonic via `internal/serialization`) +- `github.com/yusing/goutils/strings` - JSON serialization helpers (backend: `encoding/json/v2` via `internal/serialization`) ## Observability diff --git a/content/docs/impl/internal-serialization.mdx b/content/docs/impl/internal-serialization.mdx index 652d1c0..f172a53 100644 --- a/content/docs/impl/internal-serialization.mdx +++ b/content/docs/impl/internal-serialization.mdx @@ -215,17 +215,7 @@ autocert: - `github.com/go-playground/validator/v10` - Validation - `github.com/puzpuzpuz/xsync/v4` - Type cache - `github.com/yusing/goutils/strings` - Pluggable JSON marshal/unmarshal/streaming API used across godoxy -- `github.com/bytedance/sonic` - Optional JSON backend for that API: registered in `init()` when **`USE_SONIC_JSON`** is true (process env via `env.GetEnvBool`, default **true**). -- Set **`USE_SONIC_JSON=false`** if the binary hits **`SIGILL: illegal instruction`** on hardware that lacks the assumptions Sonic relies on. - -### `USE_SONIC_JSON` - -| Value | Behavior | -| ---------------- | ----------------------------------------------------------------------------------------------- | -| `true` (default) | `setupSonic()` wires Sonic into `strutils` for marshal, unmarshal, indent, and encoder helpers. | -| `false` | Sonic is not registered; JSON uses whatever default `strutils` provides without explicit setup. | - -Documented in repository `.env.example`, `rootless.env.example`, agent compose template (`agent/pkg/agent/templates/agent.compose.yml.tmpl`), and `scripts/install-agent.sh`. +- `encoding/json/v2` and `encoding/json/jsontext` - JSON backend registered in `init()` (`setupJSONV2()`). `time.Duration` keeps v1 nanosecond numbers via `encoding/json.FormatDurationAsNano`. ### Internal Dependencies