Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有方法让sonic.ConfigFastest.NewEncoder强制接管marshal方法吗 #705

Closed
Nyx2022 opened this issue Oct 18, 2024 · 3 comments
Closed

Comments

@Nyx2022
Copy link

Nyx2022 commented Oct 18, 2024

#702 ,关的太快了,
确实可以看到cmap这个库自己实现了marshaljson这个方法,然后使用了goalng自带的json库,dao'z导致使用sonic变成了寂寞。所以我想问,sonic有办法忽略函数的marshaljson函数吗

@Nyx2022 Nyx2022 changed the title 有方法让sonic.ConfigFastest.NewEncoder强制接管marshal方法 有方法让sonic.ConfigFastest.NewEncoder强制接管marshal方法吗 Oct 18, 2024
@AsterDY
Copy link
Collaborator

AsterDY commented Oct 28, 2024

没有。自己写个util库wrap一下。做好业务代码统一约束才是最佳实践

@Nyx2022
Copy link
Author

Nyx2022 commented Oct 28, 2024

但是很多第三方库使用的是golang自带的json库啊,我怎么约束

@AsterDY AsterDY closed this as completed Oct 29, 2024
@xiusin
Copy link

xiusin commented Nov 9, 2024

但是很多第三方库使用的是golang自带的json库啊,我怎么约束

更快的方法是把/dir/go/src里的代码删了换成这个 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants