﻿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
11970	JSON Deserialiser throws ValueError on malformed input	Malcolm Box	nobody	"/core/serializers/json.py Deserializer uses simplejson to parse the input string.  If this input is malformed, then simplejson throws a ValueError exception.

However, the serializer interface appears (see XML & base.py) that it should raise a  base.DeserializationError when deserialization fails, not a ValueError.  Users of the deserializer (e.g. django-restapi) then fail to handle the ValueError, resulting in Internal Server (500) errors.

The fix is to catch ValueError in json.py (around line 40) and re-raise as a DeserializationError.

Simple patch attached.
"	Bug	closed	Core (Serialization)	dev	Normal	fixed		Malcolm Box	Ready for checkin	1	0	0	0	0	0
