class_docstr: Encoder to be used as cls in json.dump.
  
  Args:
      args (object): Passed to super class.
      kwargs (dict): Passed to super class.
docstr: Perform JSON encoding.
  
  Args:
      o (object): Object to encode.
  
  Raises:
      TypeError: If `o` cannot be turned into JSON even using `repr(o)`.
  
  Returns:
      dict or str or float or bool: Object encoded in JSON.
docstr_tok: ["Perform","JSON","encoding",".","Args",":","o","(","object",")",":","Object","to","encode",".","Raises",":","TypeError",":","If","`","o","`","can","not","be","turned","into","JSON","even","using","`","repr","(","o",")","`",".","Returns",":","dict","or","str","or","float","or","bool",":","Object","encoded","in","JSON","."]
code: def default(self, o):
      """Perform JSON encoding.
  
      Args:
          o (object): Object to encode.
  
      Raises:
          TypeError: If `o` cannot be turned into JSON even using `repr(o)`.
  
      Returns:
          dict or str or float or bool: Object encoded in JSON.
  
      """
      # Why is this method hidden? What does that mean?
      # pylint: disable=method-hidden
      # pylint: disable=too-many-branches
      # pylint: disable=too-many-return-statements
      # This circular reference checking code was copied from the standard
      # library json implementation, but it outputs a repr'd string instead
      # of ValueError on a circular reference.
      if isinstance(o, (int, bool, float, str)):
          return o
      else:
          markerid = id(o)
          if markerid in self._markers:
              return "circular " + repr(o)
          else:
              self._markers[markerid] = o
              try:
                  return self._default_inner(o)
              finally:
                  del self._markers[markerid]
  
imports: import collections
  import datetime
  import enum
  import functools
  import gc
  import inspect
  import json
  import os
  import pathlib
  import subprocess
  import warnings
  import weakref
  import dateutil.tz
  import dowel
  from dowel import logger
  import numpy
  import __main__
label_desc: Use image node_id 2 for calling the LogEncoder obj's underlying member method code with example usage: obj.default(o) and returns: o, unknown, self