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

Fix message extras unmarshaled to incompatible json type #624

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

zknill
Copy link
Contributor

@zknill zknill commented Oct 3, 2023

Message extras should be a json compatible map[string]interface{}, but when marshalling to msgpack and back again, any nested objects become map[interface{}]interface{} which is incompatible with json marshalling.

Set the map type on the msgpack handle to map[string]interface{} so that nested objects are correctly unmarshaled.

@github-actions github-actions bot temporarily deployed to staging/pull/624/features October 3, 2023 11:40 Inactive
@zknill zknill requested a review from lmars October 3, 2023 11:41
@github-actions github-actions bot temporarily deployed to staging/pull/624/godoc October 3, 2023 11:41 Inactive
Copy link
Member

@lmars lmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than test naming 👍

ably/proto_message_decoding_test.go Outdated Show resolved Hide resolved
ably/internal/ablyutil/msgpack_test.go Outdated Show resolved Hide resolved
Message extras should be a json compatible map[string]interface{}, but
when marshalling to msgpack and back again, any nested objects become
map[interface{}]interface{} which is incompatible with json marshalling.

Set the map type on the msgpack handle to map[string]interface{} so that
nested objects are correctly unmarshaled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants