feat(json): improve JSON performance with bytedance/sonic

This commit is contained in:
yusing
2025-09-29 17:43:34 +08:00
parent 024100aa8c
commit f411e17d80
29 changed files with 86 additions and 78 deletions

View File

@@ -1,8 +1,7 @@
package types
import (
"encoding/json"
"github.com/bytedance/sonic"
"github.com/docker/docker/api/types/container"
"github.com/yusing/ds/ordered"
"github.com/yusing/godoxy/agent/pkg/agent"
@@ -79,5 +78,5 @@ func (e *ContainerError) Unwrap() error {
func (e *ContainerError) MarshalJSON() ([]byte, error) {
err := e.errs.Error().(interface{ Plain() []byte })
return json.Marshal(string(err.Plain()))
return sonic.Marshal(string(err.Plain()))
}