Registry / serialization / go-json-experiment-json

go-json-experiment-json

JSON →
library0.0.0-20231102232822-2e55bd4e08b0gogounverified

Package json implements semantic processing of JSON as specified in RFC 8259, providing secure and interoperable JSON marshaling and unmarshaling with configurable options.

go get github.com/go-json-experiment/json
INSTALL
IMPORT
SIG · GO-JSON-EXPERIMENT
G
go-json-experiment-json
serializationgov0.0.0-20231102232822-2e55bd4e08b0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

json
github.com/go-json-experiment/json

Marshal a struct to JSON using the experimental v2 API.

package main import ( "fmt" "github.com/go-json-experiment/json" ) func main() { type Person struct { Name string `json:"name"` Age int `json:"age"` } p := Person{Name: "Alice", Age: 30} b, err := json.Marshal(p) if err != nil { panic(err) } fmt.Println(string(b)) }
Debug
Known issues
breakingThis is an experimental fork of encoding/json with different defaults (e.g., rejects duplicate names, invalid UTF-8).
fix
Review the documentation for differences from encoding/json before migrating.
affects: >=0.0.0
Upgrade
Version history
0.0.0-20231102232822-2e55bd4e08b0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
go-json-experiment-json — go get go-json-experiment-json · libregistry