#33284: JSONFIeld decode error with Python 3.9 -------------------------------------+------------------------------------- Reporter: Alan D. Snow | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: 3.2 (models, ORM) | Severity: Normal | Resolution: duplicate Keywords: python, json | Triage Stage: | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Alan D. Snow): When I do: {{{ class Table(models.Model): metadata = JSONField( blank=True, default=dict, help_text="Any additional metadata.", ) }}} And create a model and query for it: {{{ table = Table.objects.create(metadata={"A": "B"}) found = table.objects.first() }}} I get an error. If I set found.metadata = "", and query fort it, the error goes away. -- Ticket URL: <https://code.djangoproject.com/ticket/33284#comment:8> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.9ef05b105270069cb925a5330ce8e785%40djangoproject.com.