class_docstr: JSON encoder and decoder that handles TensorShapes and tuples.
class_docstr_tok: ["JSON","encoder","and","decoder","that","handles","TensorShapes","and","tuples","."]
docstr: Encodes objects for types that aren't handled by the default encoder.
docstr_tok: ["Encodes","objects","for","types","that","are","n't","handled","by","the","default","encoder","."]
code: def default(self, obj):  # pylint: disable=method-hidden
      """Encodes objects for types that aren't handled by the default encoder."""
      if isinstance(obj, tensor_shape.TensorShape):
          items = obj.as_list() if obj.rank is not None else None
          return {"class_name": "TensorShape", "items": items}
      return get_json_type(obj)
  
file_path: tensorflow-upstream/tensorflow/python/keras/saving/saved_model/json_utils.py
imports: import collections
  import enum
  import json
  import numpy
  import wrapt
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.types import internal
label_desc: Use image node_id 1 for calling the Encoder obj's underlying member method code with example usage: obj.default(obj) and returns: get_json_type, dict