mirror of
https://github.com/hanzoai/zip.git
synced 2026-10-30 20:11:40 +00:00
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.
11 lines
450 B
Go
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) }
|