-
Notifications
You must be signed in to change notification settings - Fork 227
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
pubish() should be able to take a JS object as input #121
Comments
We used to support this, but the PubSub team specifically requested we remove this feature and only accept Buffers. I'm not sure if they still have strong feelings on this subject. @kir-titievsky any thoughts here? |
I don't remember why we said this. But I presume that one can have non-json Buffers. |
To clarify: I am not asking for |
Here's the origin discussion for anyone that can see it: https://docs.google.com/document/d/12QHQnF7ThXcNnFTOyQgsmygAYk8QiWvPjUfoYs_kKng/edit?disco=AAAABEGnPOE |
Ah. Thanks, Steren. Could you say more on how this addition would help you?
On Mon, Apr 30, 2018 at 5:34 PM Steren ***@***.***> wrote:
To clarify: I am not asking for .publish() to only take JS objects, I am
asking that when I pass a JS object to publish()that is not a buffer, it
gets transformed into a buffer for me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#121 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARrMFu_Vqhlv-zWBYCBjOgATnD4e3_SWks5tt4NVgaJpZM4TrLAX>
.
--
Kir Titievsky | Product Manager | Google Cloud Pub/Sub
|
This would improve the developer experience by simplifying a very common use case. See my first message in this issue to understand the difference. |
I'd love for it to be another method name for such a function, like |
* bump version to 0.14.0
I wanted to publish a JSON payload to a topic:
Observed:
Expected:
await publisher.publish({ hello : "world" });
The text was updated successfully, but these errors were encountered: