Files
zeekay 795617c313 zip: the module is hanzo.ai/zip
The import path a reader types is the one the org owns, rather than the forge
that happens to host the bytes. hanzo.ai serves the go-import meta and points it
at the same repository, so where the code lives does not change.

The README's `go get` line moves with it — an install instruction naming the old
path is the one leftover a reader would actually follow.
2026-08-23 21:44:55 -07:00

11 lines
450 B
Go

package runtime
import "hanzo.ai/zip/internal/jsonenc"
// jsonMarshal / jsonUnmarshal route through zip's jsonenc package so the
// embedded-JS bridge uses the same JSON impl as the edge (encoding/json,
// or encoding/json/v2 under GOEXPERIMENT=jsonv2) — one wire format, one
// way to encode it.
func jsonMarshal(v any) ([]byte, error) { return jsonenc.Marshal(v) }
func jsonUnmarshal(b []byte, v any) error { return jsonenc.Unmarshal(b, v) }