-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add support for yaml encoding response / decoding request #1252
Comments
Any update on this ? Just tell me if it's something that you like or not :). Thanks by advance for your response |
Thank you @Nexucis for the suggestion. We'll consider it and get back to you. |
Hello, I did a PR here #1273 to implement YAML at |
Thank you for your contribution :) You're doing very well for your 1st contribution! :) This feature looks small and innocent :) but I'm more worried about the trend it sets for future development... What if tomorrow someone comes with adding support for TOML (or X, Y, Z...)? Do we add them all to the core of the Echo? Also, how common is for APIs to consume YAML? Does anyone know? I have worked with YAML, just not as an API request format. Last but not least, is there even an agreed upon MIME type for YAML? :-) I see a lot of proposals and not a lot of consensus... @vishr @im-kulikov (and anyone else really) what are you thoughts on this? I for one think that using the custom binder is preferable than extending |
I think we should be cognizant about adding new functions to the context. To me, in last 4 years this is the first time someone is concerned about |
I’m agree with @vishr.. |
I’m using YAML because in JSON format you have to escape @alexaandru You right about the fact that echo has to be lightweight service Thanks @vishr, I will check it |
On my side, I think YAML is becoming as standard as JSON, specially with the arrival of Kubernetes, Prometheus, and other cloud technology that proposed both format in their API. |
Thanks @Nexucis - that's interesting. Still, from proposal to implementation many things can happen :-) Does K8s use YAML today? All I see in it's docs are JSON fragments: https://kubernetes.io/docs/reference/using-api/api-concepts/ Also, just because we say no today, it doesn't mean we'll say no in the future as well. If state of the industry changes, and more people start asking about this, we will reconsider it of course. |
Yeah it's not really easy to know what exactly Kubernetes support, specially when they didn't say it in their API documentation : To know it, I pass by the Openshift documentation which describe the different format produces |
Thanks @Nexucis so K8s does indeed talk YAML already. Interesting... If this becomes more mainstream (talking YAML, that is), we'll revisit it. At this time an alternate solution was suggested already, so closing this one. Sorry that your 1st PR ended up being rejected, hope you agree it's the best way to go for Echo, at this time. Thank you & have a great day! |
Thanks guys 👍 |
Hello,
I didn't see anything relative to an automatic binding when someone a POST request with a YAML body. Same thing when the server send the response with YAML format.
Apart from the stream, we could have the same method that the one for JSON, like that
Are you interesting by this idea ? And by the implementation also ?
Thanks for your amazing work :)
The text was updated successfully, but these errors were encountered: