Posted in

为什么你的Go服务JSON响应延迟飙升?gjson未复用、map预分配缺失、marshal未禁用反射——3个立即生效的硬核调优项

第一章:Go服务JSON响应延迟 … 为什么你的Go服务JSON响应延迟飙升?gjson未复用、map预分配缺失、marshal未禁用反射——3个立即生效的硬核调优项Read more

Posted in

Go JSON处理性能断崖式下跌真相:map键类型不一致、gjson缓存失效、marshal冗余反射——三大罪魁首度披露

第一章:Go JSON处理性能断 … Go JSON处理性能断崖式下跌真相:map键类型不一致、gjson缓存失效、marshal冗余反射——三大罪魁首度披露Read more

Posted in

【仅限Go高级工程师查阅】:绕过json.Marshal,用//go:generate + template生成type-safe map-to-JSON函数,支持嵌套struct/泛型/自定义时间格式

第一章:Go map内struc … 【仅限Go高级工程师查阅】:绕过json.Marshal,用//go:generate + template生成type-safe map-to-JSON函数,支持嵌套struct/泛型/自定义时间格式Read more

Posted in

Go中map[any]any含struct转JSON报错“json: unsupported type”?深入runtime.typeAlg与interface{}底层类型的5层判定逻辑

第一章:Go中map[any]a … Go中map[any]any含struct转JSON报错“json: unsupported type”?深入runtime.typeAlg与interface{}底层类型的5层判定逻辑Read more

Posted in

Go map[string]struct{}转JSON失败?别再盲目加json:”,omitempty”!3种tag组合策略+2个自定义Marshaler模板

第一章:Go map[strin … Go map[string]struct{}转JSON失败?别再盲目加json:”,omitempty”!3种tag组合策略+2个自定义Marshaler模板Read more

Posted in

Go中map存struct转JSON慢300%?实测对比4种序列化路径(含unsafe+code generation优化)

第一章:Go中map存struc … Go中map存struct转JSON慢300%?实测对比4种序列化路径(含unsafe+code generation优化)Read more