-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting mongoengine objects to JSON #1
Comments
Added Document level support eg: my_doc.to_json() And Queryset support eg: MyDoc.objects(open=True).to_json() ** Note - |
@rozza it will be helpful to be able to provide |
to_json has problem with unicode strings |
I tried too many ways to cast the document inherited object to json but it was hard to do that till find this thread! Thanks. |
* fixed the bug where dynamic doc has indx inside dict field
It's entirely possible that I'm missing something, but it seems like the de facto way of converting mongoengine objects (my primary use-case is
Document
) to JSON is the following code:https://groups.google.com/forum/#!activity/mongoengine-users/N7p0Mi065swJ/mongoengine-users/ya9XbrAVwi4/N7p0Mi065swJ
Am I missing a nicer way, and if not, would a pull request with an in-mongoengine-method be appreciated?
The text was updated successfully, but these errors were encountered: