json
Package json provides JSON parse/stringify helpers. Node equivalent: JSON.parse, JSON.stringify
import "github.com/sahilkhaire/gox/json"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| MustParse | — | func | MustParse unmarshals or panics. |
| MustStringify | — | func | MustStringify marshals or panics. |
| Parse | JSON.parse(str) | func | Parse unmarshals data into v (JSON.parse). |
| ParseFile | — | func | ParseFile reads path and unmarshals into v. |
| Pretty | — | func | Pretty returns indented JSON. |
| Stringify | JSON.stringify(obj) | func | Stringify marshals v to a string (JSON.stringify). |
| WriteFile | — | func | WriteFile marshals v and writes to path (helper for examples). |