Skip to content

Support jsoniter to deal with json #1177

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

Closed
DarthPestilane opened this issue Aug 16, 2018 · 4 comments · Fixed by #1880
Closed

Support jsoniter to deal with json #1177

DarthPestilane opened this issue Aug 16, 2018 · 4 comments · Fixed by #1880
Assignees

Comments

@DarthPestilane
Copy link

Wanted to make it like go build -tags="jsoniter" which will replace encoding/json with github.com/json-iterator/go.

And I can send a PR if this feature is acceptable.

@vishr
Copy link
Member

vishr commented Oct 9, 2018

@DarthPestilane Before sending a PR can briefly describe potential changes in the code?

@DarthPestilane
Copy link
Author

@vishr I will add a new directory(subpackage) named "json" and change "encoding/json" to "github.com/labstack/echo/json" in import ...

@vishr
Copy link
Member

vishr commented Oct 10, 2018

I would refrain from adding a new dependency. Having said that, you can easily extend Context to include your custom JSON codec see https://echo.labstack.com/guide/context

@DarthPestilane
Copy link
Author

@vishr 👍

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

Successfully merging a pull request may close this issue.

2 participants