class_docstr: Sub-class of :class:`json.JSONEncoder`, used to write JSON data to disk in
  :func:`write_json()` while handling a broader range of Python objects.
  
  - :class:`datetime.datetime` => ISO-formatted string
  - :class:`datetime.date` => ISO-formatted string
class_docstr_tok: ["Sub-class","of",":","class",":","`","json.JSONEncoder","`",",","used","to","write","JSON","data","to","disk","in",":","func",":","`","write_json","(",")","`","while","handling","a","broader","range","of","Python","objects",".","-",":","class",":","`","datetime.datetime","`","=",">","ISO-formatted","string","-",":","class",":","`","datetime.date","`","=",">","ISO-formatted","string"]
code: def default(self, obj):
      if isinstance(obj, (datetime.datetime, datetime.date)):
          return obj.isoformat()
      else:
          return super().default(obj)
  
file_path: textacy/src/textacy/io/json.py
imports: from __future__ import annotations
  import datetime
  import functools
  import json
  from typing import Any, Iterable, Optional, Union
  from ..None import types
  from .None import utils
label_desc: Use image node_id 1 for calling the ExtendedJSONEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: obj, super