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

encode maps keeping keys in order. #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 22, 2017

  1. encode maps keeping keys in order.

    to keep maps in order, we first sort it by keys by transforming them as
    list. Then we process the keys/values in order.
    
    ex:
    
    2> B = sext:encode(#{ a => 1, b=>1 }).
    <<17,1,0,0,0,2,12,176,128,8,10,0,0,0,2,12,177,0,8,10,0,0,
      0,2>>
    3> B = sext:encode(#{ b => 1, a=>1 }).
    <<17,1,0,0,0,2,12,176,128,8,10,0,0,0,2,12,177,0,8,10,0,0,
      0,2>>
    benoitc committed Oct 22, 2017
    Configuration menu
    Copy the full SHA
    d5d7eb9 View commit details
    Browse the repository at this point in the history
  2. don't forget to sort ...

    benoitc committed Oct 22, 2017
    Configuration menu
    Copy the full SHA
    f7e33a8 View commit details
    Browse the repository at this point in the history