﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29473	Postgres JSONField escaping to infinity on each save	Laurynas Riliskis		"postgress JSONFields are escaping to infinity as you can see in the input below. The same behavior is reproduced through the admin interface.

I commented in bug https://code.djangoproject.com/ticket/26110 but not sure if the issue if the same.

{{{
import uuid
from django.db import models
from django.contrib.postgres.fields import JSONField

class PublishedConsent(models.Model):
    uuid = models.UUIDField(
            default=uuid.uuid4,
            editable=False)
    json = JSONField()
}}}



{{{
>>> p = JSONTest.objects.get(instance=""4550d7f3a28c4081af5b3ff5ac62ab60"")
>>> p.data
'{}'
>>> p.save()
>>> p = JSONTest.objects.get(instance=""4550d7f3a28c4081af5b3ff5ac62ab60"")
>>> p.data
'""{}""'
>>> p.save()
>>> p = JSONTest.objects.get(instance=""4550d7f3a28c4081af5b3ff5ac62ab60"")
>>> p.data
'""\\""{}\\""""'
>>> p.save()
>>> p = JSONTest.objects.get(instance=""4550d7f3a28c4081af5b3ff5ac62ab60"")
>>> p.data
'""\\""\\\\\\""{}\\\\\\""\\""""'
}}}
"	Bug	closed	contrib.postgres	2.0	Normal	needsinfo	postgress JSONFields		Unreviewed	0	0	0	0	0	0
