class_docstr: Encodes Geometry, Feature, and Properties.
class_docstr_tok: ["Encodes","Geometry",",","Feature",",","and","Properties","."]
code: def default(self, o):
      if isinstance(o, Object):
          o_dict = {k: self.default(v) for k, v in o.items()}
          if isinstance(o, Geometry):
              if o.type == "GeometryCollection":
                  _ = o_dict.pop("coordinates", None)
              else:
                  _ = o_dict.pop("geometries", None)
          elif isinstance(o, Feature):
              o_dict["type"] = "Feature"
          return o_dict
      elif isinstance(o, bytes):
          return hexlify(o)
      else:
          return o
  
imports: from binascii import hexlify
  from collections.abc import MutableMapping
  from enum import Enum
  import itertools
  from json import JSONEncoder
  from warnings import warn
  from fiona.errors import FionaDeprecationWarning
label_desc: Use image node_id 1 for calling the ObjectEncoder obj's underlying member method code with example usage: obj.default(o) and returns: o_dict, hexlify, o