Hi,

its just the same error when using django.utils.simplejson.

any idea, whats going wrong?

On 13 Mai, 23:30, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On May 13, 5:11 pm, mwebs <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I have some problems deserializing a json.object. I am quite new in
> > using json, an I think the json is not formatted correctly.
>
> > When I print:
>
> > request.POST[elems]
>
> > I get a String like this: "1,2,3"
>
> > But when I try to to do
>
> > for elem in serializers.deserialize("json", data ):
>
> > I just get a valueError: Extra data: line 1 column 1 - line 1 column 5
> > (char 1 - 5)
>
> django.core.serializers.* are meant for serializing Django model
> objects.
>
> If you want to work with primitive objects, just use
> django.utils.simplejson directly. Something like:
>
> from django.utils import simplejson
> for elem in simplejson.loads("[1, 2, 3]")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to