MongoDB\BSON\toPHP to MongoDB\BSON\toGO ? is there any function like this?

MongoDB\BSON\toPHP to MongoDB\BSON\toGO ??? is there any function like this??

What do you mean by toPHP and toGO? What do you want do achieve?

Can you please properly describe what you are searching for?

Currently it reads just as if you were searching for a BSON (de)-serializer in Go, quickly googling brought up gobson as the most prominent one on the first page. If it doesn’t suite you, you need to concretize your requirements or google for yourself.

i want to serialised that type of mongo data —


Google brought up this:

This reads as if it were a deserializer from BSON to PHP, thats why I also googled for BSON to Go (de)serializer and suggested. I hope it helps him.


In this case, your data is “serialized”, if you want “deserialized”, you try this:

But isn’t that serialising and deserialising from some PHP-Marshalling format to a go struct?

I do read the OPs question that he wants to deserialise BSON objects he gets from a MongoDB into a Go struct. So until he clarifies I still think gobson is the right tool for the job…

So, try using library

Thanks to everyone for your help

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.