Skip to content

feat: make JSON lib configurable #2088

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

secDre4mer
Copy link

Currently, a mix of goccy/json and encoding/json is used. Both use the same interface; goccy/json is faster, however, it also does questionable things with go:linkname (problematic with e.g. https://github.com/traefik/yaegi) and has issues with marshaling some structs.
Create a common package that can switch (via build tags) from one implementation to another, and use that in all packages.

@harshavardhana harshavardhana requested a review from klauspost April 8, 2025 17:09
Currently, a mix of goccy/json and encoding/json is used. Both
use the same interface; goccy/json is faster, however, it also
does questionable things with go:linkname.
Create a common package that can be switched (via build tags)
from one implementation to another, and use that in all packages.
@secDre4mer
Copy link
Author

Pushed a new version to fix the (correct) linter issues about missing comments.

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

Successfully merging this pull request may close these issues.

3 participants