﻿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
5553	JSON serializer imporperly serializes: datetime.datetime, datetime.time, float	Maciej Wiśniowski	nobody	"This bug was introduced after commiting patch for this ticket: http://code.djangoproject.com/ticket/4714
Original patch I've written was changed by commiter and this introduced some issues.

Problem is that now serializers/python.py uses smart_unicode(... , strings_only=True).
Unfortunatelly smart_unicode only recogizes None, int and long as not strings. 
Because of this, datetime objects (as well as floats) are converted to strings.
This causes that serializers/json.py -> DjangoJSONEncoder is useless.

My, original implementation from #4714, uses function 'str_to_unicode' that converts only 
instances of basestring to unicode - so it works properly. 

I'm not sure why it was changed to 'smart_unicode', but if 'smart_unicode' should be used then 
'force_unicode''s detection of strings has to be changed.
Problem is with datetime.datetime, datetime.time, float and possibly Decimal.

I've attached a patch with tests."		closed	Core (Serialization)	dev		fixed	json		Unreviewed	1	0	0	0	0	0
