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

Getting data before deserialization #7

Open
kchaliki opened this issue Jun 6, 2018 · 2 comments
Open

Getting data before deserialization #7

kchaliki opened this issue Jun 6, 2018 · 2 comments

Comments

@kchaliki
Copy link

kchaliki commented Jun 6, 2018

Hello - would like to ask what you think about the following:

When registering a callback to receive messages, the library code will by default call utils.DeserializeDataFromString on the message and pass a map[string]interface{} to the callback.

If the client code wants to unmarshall the message directly to a struct it has serialize then deserialize again or do an awful lot of copying and casting. Do you think it makes sense to pass back bytes instead?

@happilymarrieddad
Copy link

Yea, I think it would be nice to have this. +1

@sacOO7
Copy link
Owner

sacOO7 commented Oct 3, 2018

Yeah, it will probably look into it. But, i am sure you will need some mechanism to convert bytes to struct.. or a proper json struct model.

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

No branches or pull requests

3 participants