support datetime in json encoding