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

Refactor easyjson with encoding/json #579

Open
Ja7ad opened this issue Sep 28, 2024 · 5 comments
Open

Refactor easyjson with encoding/json #579

Ja7ad opened this issue Sep 28, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ja7ad
Copy link
Collaborator

Ja7ad commented Sep 28, 2024

Description
We propose removing easyjson and refactoring the SDK to use the built-in encoding/json package. Although easyjson provides performance benefits, it has limitations when dealing with dynamic types, such as interface{} in search results. This was highlighted in #436, where large numeric values encountered precision issues. Switching to encoding/json would improve flexibility, maintainability, and error handling.

Basic example

// Replace easyjson.Marshal with json.Marshal
json.Marshal(data)
@Ja7ad Ja7ad added the enhancement New feature or request label Sep 28, 2024
@Ja7ad Ja7ad self-assigned this Sep 28, 2024
@Ja7ad Ja7ad changed the title Refactor encoding/json with easyjson Refactor easyjson with encoding/json Sep 28, 2024
@Ja7ad
Copy link
Collaborator Author

Ja7ad commented Oct 2, 2024

Hits field with type *[]map[string]json.RawMessage and unmarshaled value fixed without write custom marshaler.

Screenshot from 2024-10-02 15-41-55
Screenshot from 2024-10-02 15-42-12
Screenshot from 2024-10-02 15-42-25

@Ja7ad
Copy link
Collaborator Author

Ja7ad commented Oct 2, 2024

easyjson make complex client for unmarshaling.

@hegdeshashank73
Copy link

hegdeshashank73 commented Oct 25, 2024

Is this issue still open @Ja7ad . Wanted to pick it up

@Ja7ad
Copy link
Collaborator Author

Ja7ad commented Oct 25, 2024

Is this issue still open @Ja7ad . Wanted to pick it up

Yes I'm working on this issue #582

@curquiza
Copy link
Member

curquiza commented Nov 6, 2024

@hegdeshashank73 thank you for your interest. The issue is already picked up, however, you are always welcome to provide review on the PR #582 😊

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

Successfully merging a pull request may close this issue.

3 participants