I dumps a datetime
object into to json object and I get:
a = u'2015-02-17T15:06:23.869000'
How to transfer it back to a datetime object?
You can use the following code:
>>> import datetime
>>> datetime.datetime.strptime(u"2015-02-17T15:06:23.869000", "%Y-%m-%dT%H:%M:%S.%f")
datetime.datetime(2015, 2, 17, 15, 6, 23, 869000)
to parse it back to a datetime
object. JSON has no special representation for a datetime object, so your program encodes it as a string.