Documentation
¶
Overview ¶
Package json provides a pluggable JSON engine for Kruda. This file uses github.com/bytedance/sonic for SIMD-accelerated JSON processing. It is compiled by default when CGO is enabled and the kruda_stdjson tag is not set.
Index ¶
Constants ¶
View Source
const EncoderName = "sonic"
EncoderName identifies the active JSON encoder for diagnostics.
Variables ¶
This section is empty.
Functions ¶
func MarshalToBuffer ¶
MarshalToBuffer encodes v as JSON into the provided buffer using Sonic's streaming encoder. This avoids the intermediate []byte allocation that Marshal performs, enabling callers to reuse buffers via sync.Pool.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.