Skip to content

feat: make JSON lib configurable#2088

Merged
harshavardhana merged 1 commit into
minio:masterfrom
secDre4mer:master
May 3, 2025
Merged

feat: make JSON lib configurable#2088
harshavardhana merged 1 commit into
minio:masterfrom
secDre4mer:master

Conversation

@secDre4mer
Copy link
Copy Markdown
Contributor

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.

Comment thread pkg/json/json_goccy.go Outdated
@harshavardhana harshavardhana requested a review from klauspost April 8, 2025 17:09
Comment thread pkg/json/json_goccy.go Outdated
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
Copy Markdown
Contributor Author

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

@secDre4mer
Copy link
Copy Markdown
Contributor Author

@harshavardhana Are there any additional changes you'd like to see for this PR?

@harshavardhana harshavardhana merged commit dc867a5 into minio:master May 3, 2025
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