$ account mailru
easyjson is a Go library and code generator that produces specialized, reflection-free JSON marshal/unmarshal code for Go structs. It achieves 4–5× faster serialization than the standard `encoding/json` by generating type-specific encoder/decoder functions at compile time. The architecture consists of a CLI tool (`easyjson/main.go`) that parses Go source files, extracts struct annotations (`//easyjson:json`), and generates `_easyjson.go` files implementing `easyjson.Marshaler`/`Unmarshaler` interfaces. The runtime library provides a fast JSON lexer (`jlexer`), writer (`jwriter`), buffer pool (`buffer`), optional types (`opt`), and helpers for unknown fields, string interning, and zero-copy parsing. The project includes extensive benchmarks comparing against ffjson, jsoniter, and go/codec, and a comprehensive test suite covering edge cases like omitempty, snake_case, embedded types, and custom key types.