mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
The old form marshaled and re-parsed on every call, which is both slower and lossy: every number decoded as float64 regardless of what the caller held. The typed clone preserves map, slice, scalar, and json.Number values, returns nil for nil, and deep-copies nested maps and slices so callers cannot alias the input.