This repository was archived by the owner on Aug 7, 2023. It is now read-only.
Unable to increment value in list of object. #222
Unanswered
harshitsinghai77
asked this question in
Help
Replies: 1 comment 9 replies
-
|
Note: Python a dict can contain custom types / objets to any key but JSON can't as it relies on generic data types. Unlike JSON python keys can be integers too. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I have a use case where I need to increment id such as
My code
But I'm getting an error saying:
TypeError: Object of type Increment is not JSON serializableWhich makes sense.
On print I get this
{'id': <deta.base.Util.Increment object at 0x7f899005ac40>, 'created_at': '2022-05-26 08:12:51.714123', 'task_description': 'My Second Task', 'duration': 3600, 'task_date': '2022-05-26 08:12:51.714125'}What am I doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions