fixed JSONWriter bug with datetime