From 93da1d16f386975ec17661443dc998e294f7fefe Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 19 Sep 2016 12:03:03 +0100 Subject: [PATCH] No need for canonical encoding for storage --- util/pack/pack.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/pack/pack.go b/util/pack/pack.go index 2e6a80fc..115893c5 100644 --- a/util/pack/pack.go +++ b/util/pack/pack.go @@ -35,7 +35,6 @@ func init() { // GOB gob.Register(time.Time{}) - jh.Canonical = true gob.Register([]interface{}{}) gob.Register(map[string]interface{}{}) gob.Register(sql.Null{}) @@ -65,6 +64,7 @@ func init() { // JSON + jh.Canonical = false jh.CheckCircularRef = false jh.AsSymbols = codec.AsSymbolDefault jh.SliceType = reflect.TypeOf([]interface{}(nil)) @@ -72,7 +72,7 @@ func init() { // CBOR - ch.Canonical = true + ch.Canonical = false ch.CheckCircularRef = false ch.AsSymbols = codec.AsSymbolDefault ch.SliceType = reflect.TypeOf([]interface{}(nil)) @@ -80,7 +80,7 @@ func init() { // BINC - bh.Canonical = true + bh.Canonical = false bh.CheckCircularRef = false bh.AsSymbols = codec.AsSymbolDefault bh.SliceType = reflect.TypeOf([]interface{}(nil)) @@ -103,7 +103,7 @@ func init() { // PACK mh.WriteExt = true - mh.Canonical = true + mh.Canonical = false mh.RawToString = true mh.CheckCircularRef = false mh.AsSymbols = codec.AsSymbolDefault