Object of type ObjectId is not JSON serializable how to send mongo object as json while return

0 votes

def get_all_notification(request):

    list_of_notification = DatalayersClass.get_all_notification_data()

    # data.append({'params':list_of_params })

    return json.dumps(list_of_notification)

Oct 13, 2020 in Python by anonymous
• 160 points

recategorized Oct 13, 2020 by Niroj 4,220 views

1 answer to this question.

0 votes
Hi, @There,

Make sure that your MongoDB instance is running on Windows, run the following command from the Windows command prompt:

tasklist /FI "imagename eq mongod.exe"
answered Oct 13, 2020 by Gitika
• 65,770 points

Related Questions In Python

0 votes
0 answers

Python - TypeError: Object of type 'int64' is not JSON serializable

My data frame has store names and ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
2,558 views
0 votes
0 answers

Excel .json Import Error: The Type of Current Preview Value is Too Complex to Display

Main Problem: I'm trying to import .json to excel ...READ MORE

Mar 15, 2020 in Python by Tarık
• 120 points
1,715 views
0 votes
0 answers

How to return None if Dictionary key is not available?

I need a way to get a ...READ MORE

Apr 13, 2020 in Python by kartik
• 37,520 points
539 views
0 votes
1 answer

How to convert a DictProxy object into JSON serializable dict?

Hello, Rather than using a private DictProxy method like _getvalue(), I'd ...READ MORE

answered Apr 15, 2020 in Python by Niroj
• 82,840 points
5,250 views
0 votes
1 answer
0 votes
1 answer

How to check the memory usage of an object in python

Hi, @Roshni, You can use this code below: import ...READ MORE

answered Jun 26, 2020 in Python by Gitika
• 65,770 points
3,459 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP