class_docstr: Before sending datetimes over the wire, convert them to Unix timestamps
  in milliseconds since epoch, using Perspective's date validator to
  ensure consistency.
class_docstr_tok: ["Before","sending","datetimes","over","the","wire",",","convert","them","to","Unix","timestamps","in","milliseconds","since","epoch",",","using","Perspective","'s","date","validator","to","ensure","consistency","."]
code: def default(self, obj):
      if isinstance(obj, datetime.datetime):
          return _date_validator.to_timestamp(obj)
      else:
          return super(DateTimeEncoder, self).default(obj)
  
imports: import datetime
  import json
  import logging
  from collections import deque
  from functools import partial
  from ..core.exception import PerspectiveError
  from ..table import PerspectiveCppError, Table
  from ..table._callback_cache import _PerspectiveCallBackCache
  from ..table._date_validator import _PerspectiveDateValidator
label_desc: Use image node_id 1 for calling the DateTimeEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: _date_validator, super