From 7968460fa26df9f2225aa3801c3ca83777e1279d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 9 Oct 2023 15:25:30 +0200 Subject: [PATCH] v0.0.285 --- goextVersion.go | 4 ++-- mongoext/registry.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/goextVersion.go b/goextVersion.go index 3ada5b5..b2c3a24 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.284" +const GoextVersion = "0.0.285" -const GoextVersionTimestamp = "2023-10-09T15:22:57+0200" +const GoextVersionTimestamp = "2023-10-09T15:25:30+0200" diff --git a/mongoext/registry.go b/mongoext/registry.go index 08a0169..9b67579 100644 --- a/mongoext/registry.go +++ b/mongoext/registry.go @@ -12,10 +12,6 @@ import ( func CreateGoExtBsonRegistry() *bsoncodec.Registry { rb := bsoncodec.NewRegistryBuilder() - // otherwise we get []primitve.E when unmarshalling into any - // which will result in {'key': .., 'value': ...}[] json when json-marshalling - rb.RegisterTypeMapEntry(bsontype.EmbeddedDocument, reflect.TypeOf(primitive.M{})) - rb.RegisterTypeDecoder(reflect.TypeOf(rfctime.RFC3339Time{}), rfctime.RFC3339Time{}) rb.RegisterTypeDecoder(reflect.TypeOf(&rfctime.RFC3339Time{}), rfctime.RFC3339Time{}) @@ -30,5 +26,9 @@ func CreateGoExtBsonRegistry() *bsoncodec.Registry { bson.PrimitiveCodecs{}.RegisterPrimitiveCodecs(rb) + // otherwise we get []primitve.E when unmarshalling into any + // which will result in {'key': .., 'value': ...}[] json when json-marshalling + rb.RegisterTypeMapEntry(bsontype.EmbeddedDocument, reflect.TypeOf(primitive.M{})) + return rb.Build() }