From 1c77c2b8e8696cbfc5cbe5728cf7cdac2ce69435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Fri, 5 May 2023 18:05:58 +0200 Subject: [PATCH] v0.0.113 --- gojson/encode_test.go | 2 +- mongoext/registry.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gojson/encode_test.go b/gojson/encode_test.go index 6e9aa2e..e3f35c6 100644 --- a/gojson/encode_test.go +++ b/gojson/encode_test.go @@ -1274,7 +1274,7 @@ func TestMarshalSafeCollections(t *testing.T) { } for i, tt := range tests { - b, err := MarshalSafeCollections(tt.in, true, true) + b, err := MarshalSafeCollections(tt.in, true, true, nil) if err != nil { t.Errorf("test %d, unexpected failure: %v", i, err) } diff --git a/mongoext/registry.go b/mongoext/registry.go index f11aa34..9a5ebaf 100644 --- a/mongoext/registry.go +++ b/mongoext/registry.go @@ -11,7 +11,10 @@ func CreateGoExtBsonRegistry() *bsoncodec.Registry { rb := bsoncodec.NewRegistryBuilder() rb.RegisterTypeDecoder(reflect.TypeOf(rfctime.RFC3339Time{}), rfctime.RFC3339Time{}) + rb.RegisterTypeDecoder(reflect.TypeOf(&rfctime.RFC3339Time{}), rfctime.RFC3339Time{}) + rb.RegisterTypeDecoder(reflect.TypeOf(rfctime.RFC3339NanoTime{}), rfctime.RFC3339NanoTime{}) + rb.RegisterTypeDecoder(reflect.TypeOf(&rfctime.RFC3339NanoTime{}), rfctime.RFC3339NanoTime{}) bsoncodec.DefaultValueEncoders{}.RegisterDefaultEncoders(rb) bsoncodec.DefaultValueDecoders{}.RegisterDefaultDecoders(rb)