I need to build a list of "pages" so part of this there will be a cursor. The issue is that I can't find a way to encode(to string) and decode the cursor. Any idea? The Cursor interface has no "encoding" method(there is ID, though undocumented) and…
I am using Golang as backed language with mongodb database and also new to this language.I have used both libraries "gopkg.in/mgo.v2" and "go.mongodb.org/mongo-driver/mongo" to perform all CRUD oprations. My Question is which one is more efficient…
I'm trying to read from a database and then return the result to the user as json.
What's happening is that I'm getting output like:
[{"Key":"foo","Value":"bar"}]
When I would like to get:
"{"foo":"bar"}"
How do I get the former?
Example: (reading…