Skip to content

Conversation

@stephenpascoe
Copy link

I'd like to make canonicalised pack data to make suitable for hashing. I've noticed msgpack-perl already supports this. Would you consider this patch to allow sorting of dictionary keys during packing?

The code preserves the original logic as much as possible at the expense of repeating a for loop. This could be made more concise.

Also has a test. Although I can't get the tests running because "msgpack.packs" doesn't exist.

@methane
Copy link
Member

methane commented Oct 24, 2011

Thank you for your request.

I agree on sorting dict key is a nice feature.

But I afraid about there are no spec about "Canonical" msgpack.
I talk with frsyuki (msgpack spec author) about defining "canonical".
Please wait for a days, or join us at Twitter with #msgpack hashtag.
I'm @methane and frsyuki is @frsyuki.

@methane
Copy link
Member

methane commented Jun 19, 2012

Sorry, there is no conclusion about "Canonical" msgpack.
I reject this for KISS.

@methane methane closed this Jun 19, 2012
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

Successfully merging this pull request may close these issues.

2 participants