Skip to content

Canonicalising pack#1

Closed
stephenpascoe wants to merge 2 commits into
msgpack:masterfrom
stephenpascoe:canonical
Closed

Canonicalising pack#1
stephenpascoe wants to merge 2 commits into
msgpack:masterfrom
stephenpascoe:canonical

Conversation

@stephenpascoe

Copy link
Copy Markdown

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

methane commented Oct 24, 2011

Copy link
Copy Markdown
Member

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

methane commented Jun 19, 2012

Copy link
Copy Markdown
Member

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