From 08322923674f999ad6ebc8e4e822ce4ac03dd291 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Tue, 31 Mar 2020 18:28:38 +0200 Subject: [PATCH] fix(rpc): registered json.RawMessage for gob encoding (#1232) --- lib/lib.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/lib.go b/lib/lib.go index 8a590e703..410f01ec7 100644 --- a/lib/lib.go +++ b/lib/lib.go @@ -6,6 +6,7 @@ package lib import ( "context" "encoding/gob" + "encoding/json" "errors" "fmt" "net" @@ -56,6 +57,7 @@ func init() { // Fields like dataset.Structure.Schema contain data of arbitrary types, // registering with the gob package prevents errors when sending them // over net/rpc calls. + gob.Register(json.RawMessage{}) gob.Register([]interface{}{}) gob.Register(map[string]interface{}{}) }