95: Calling JSON interface to set field produces "Object not serializable" error

PNC****@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
June 16, 2007
What's the file containing the problem?
/reviews/json.py

What steps will reproduce the problem?
1. Write a JSON client that attempts to call the
/api/json/reviewrequests/<id>/draft/set/ interface with a key/value pair.
2. Fix the undefined variable problem (issue #94)

What is the expected output? What do you see instead?
The server should returned the updated draft object.  Instead, it returns
an error stating that the Draft object cannot be serialized.

What operating system are you using? What browser?
Linux / Firefox

Please provide any additional information below.
This can be worked around by changing the line return JsonResponse(request,
result) to JsonResponse(request).
david
#1 david
Can you provide the whole traceback it gives?

The JSON client you're working with might also be helpful.
  • +NeedInfo
david
#2 david
  • +Component-API
david
#3 david
I've added JSON serialization for the ReviewRequestDraft model.  Please let me
know if it doesn't serialize a field you need.
  • -NeedInfo
    +Fixed
  • +david