Skip to content
Snippets Groups Projects
  • Bob Callaway's avatar
    070f83e9
    Canonicalize JSON before inserting into trillian (#445) · 070f83e9
    Bob Callaway authored
    
    Each of the supported types has a Canonicalize() method that generates a
    JSON representation of the entry. If the golang library were to make a
    change to the order of keys when marshalling an object, it would cause
    a duplicate entry in the log for a semantically equivalent object.
    
    This change simply transforms the JSON into RFC8785-compliant
    canonicalized JSON protecting against any changes in JSON libraries
    going forward.
    
    Signed-off-by: default avatarBob Callaway <bob.callaway@gmail.com>
    Canonicalize JSON before inserting into trillian (#445)
    Bob Callaway authored
    
    Each of the supported types has a Canonicalize() method that generates a
    JSON representation of the entry. If the golang library were to make a
    change to the order of keys when marshalling an object, it would cause
    a duplicate entry in the log for a semantically equivalent object.
    
    This change simply transforms the JSON into RFC8785-compliant
    canonicalized JSON protecting against any changes in JSON libraries
    going forward.
    
    Signed-off-by: default avatarBob Callaway <bob.callaway@gmail.com>