[Answer]-Getting "array is not JSON seriazable" in django


It looks like you are trying to serialize an array. When I try to do simplejson.dumps(my_array), I get the same error. Does you view create an array? If so, can it convert it to a list or something else that works with dumps?


I would set a breakpoint (if you are using a debugger) or log some output in your views.py at 1193. Have a look at object that gets passed to json_result().

It may be that one of the object attributes is that array.

👤Rob L

Leave a comment