go-json
Values are decoded, and their errors are reported, as encoding/json of Go 1.27 (built on encoding/json/v2) does, on every Go version.
Official Documentation ↗v0.10.3. Check the official docs for the latest API surface.Installation
go get github.com/goccy/go-jsonMethods
No methods match this filter.
Overview
Values are decoded, and their errors are reported, as encoding/json of Go 1.27 (built on encoding/json/v2) does, on every Go version. Only the syntax errors of decoding and the reading of a stream token by token (Token, More, InputOffset, and Decode between calls of Token) follow the encoding/json the program is built with.
API reference status
This page lists only entry points that appear verbatim in the official README examples: json.Marshal. Parameter and return types are not given by the official README, so signatures are marked unverified.
Errors
The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:51.181Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- Values are decoded, and their errors are reported, as encoding/json of Go 1.27 (built on encoding/json/v2) does, on every Go version. (https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md)
- Only the syntax errors of decoding and the reading of a stream token by token (Token, More, InputOffset, and Decode between calls of Token) follow the encoding/json the program is built with. (https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md)
- Also, it seems to panic when it receives an unexpected value because there is no error handling… (https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md)
Security notes
Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:51.181Z.
- With json.DecodeNoCopyString(), a string without an escape needs none either. (https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md)
- A string with an escape is decoded in the same pass as it is scanned from its first escape on: the runs of plain bytes between the escapes are moved at once, and the escapes are validated and decoded as they are met. (https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md)
Verification notes
- Official source: https://github.com/goccy/go-json
- Evidence: https://cdn.jsdelivr.net/gh/goccy/go-json@latest/README.md
- Checked on 2026-11-04 by
scripts/phase11/build-api-profiles.mjs
API reference evidence
Fetched from official sources on 2026-11-08T17:52:00.000Z via WebFetch https://raw.githubusercontent.com/goccy/go-json/master/json.go.
json.Marshal→ signature from https://raw.githubusercontent.com/goccy/go-json/master/json.go; official text: “func Marshal(v any) ([]byte, error) { return MarshalWithOption(v) }”
FAQ
- What does github.com/goccy/go-json do?
- Values are decoded, and their errors are reported, as encoding/json of Go 1.27 (built on encoding/json/v2) does, on every Go version.
- How do I install github.com/goccy/go-json?
- Run `go get github.com/goccy/go-json`.
- Where can I verify the API details?
- Official repository/documentation: https://github.com/goccy/go-json. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.
Report a problem with this API docOpens a pre-filled issue on GitHub.