Registry / serialization / bytedance-sonic

bytedance-sonic

JSON →
library1.15.2gogounverified

Sonic is a fast JSON serialization and deserialization library for Go.

go get github.com/bytedance/sonic
INSTALL
IMPORT
SIG · BYTEDANCE-SONIC
B
bytedance-sonic
serializationgov1.15.2
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.

sonic
github.com/bytedance/sonic

Marshal a struct to JSON using Sonic.

package main import ( "fmt" "github.com/bytedance/sonic" ) func main() { type Person struct { Name string `json:"name"` Age int `json:"age"` } p := Person{Name: "Alice", Age: 30} data, _ := sonic.Marshal(p) fmt.Println(string(data)) }
Debug
Known issues
gotchaSonic uses CGo and may require additional build setup; it may not work on all platforms.
fix
Ensure CGo is enabled and the platform is supported (Linux amd64/arm64, macOS amd64/arm64).
affects: all
Upgrade
Version history
1.15.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
bytedance-sonic — go get bytedance-sonic · libregistry