On 4 May 2010 15:34, zweb <traderash...@gmail.com> wrote: > Is there a django or python equivalent of php json_encode? > > the data I am converting to json has text fields that have quotes, > double quotes, newlines and html tags. Creating json manually in my > program without escaping or converting these special characters is > causing problem on javascript side. > > A php programmer suggested I use equivalent of php json_encode. >
Have a look at django.serializers http://docs.djangoproject.com/en/dev/topics/serialization/ or simple-json python package. HTH Dan > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Dan Hilton ============================ www.twitter.com/danhilton www.DanHilton.co.uk ============================ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.