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

Custom marshalers 🚀 #1232

Closed
FedorLap2006 opened this issue Mar 17, 2021 · 8 comments · Fixed by #1489
Closed

Custom marshalers 🚀 #1232

FedorLap2006 opened this issue Mar 17, 2021 · 8 comments · Fixed by #1489

Comments

@FedorLap2006
Copy link

FedorLap2006 commented Mar 17, 2021

Is your feature request related to a problem?

Yes, it kinda is. In my case, internal marshalers is not the best ones, so I went into docs trying to find some configuration for those, but I couldn't, that's why I went here.

Describe the solution you'd like

An ability to switch marshalers for MIME types. See grpc-gateway's API, it's very comfortable one.

Describe alternatives you've considered

There's no alternative. Sometimes we really need to use custom marshaler. You can improve internal/external marshalers, but there must be some room for customization, because they doesn't fit so good in some situations.

Additional context

This is feature/question issue.

@welcome
Copy link

welcome bot commented Mar 17, 2021

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@ReneWerner87
Copy link
Member

Thx for the report,

You mean something like that?
https://github.com/gofiber/fiber/blob/master/app.go#L281

@ReneWerner87
Copy link
Member

@FedorLap2006

@FedorLap2006
Copy link
Author

Oh, I'm so sorry, forgot about this thing. @ReneWerner87, yeah, I mean exactly this but for Unmarshaling.

@FedorLap2006
Copy link
Author

Hope this issue will be reopened 😞

@hi019 hi019 reopened this May 22, 2021
@FedorLap2006
Copy link
Author

Thanks.

@Fenny
Copy link
Member

Fenny commented May 23, 2021

@FedorLap2006 I think we are talking about a

JSONDecoder utils.JSONUnmarshal `json:"-"`

feature for BodyParser?

@FedorLap2006
Copy link
Author

@FedorLap2006 I think we are talking about a

JSONDecoder utils.JSONUnmarshal `json:"-"`

feature for BodyParser?

Well, yeah

@ReneWerner87 ReneWerner87 linked a pull request Aug 18, 2021 that will close this issue
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.

4 participants