class_docstr: Json Serializable - numpy object type
class_docstr_tok: ["Json","Serializable","-","numpy","object","type"]
code: def default(self, obj):
      if isinstance(obj, np.integer):
          if np.isnan(obj):
              return 0
          return int(obj)
      elif isinstance(obj, np.floating):
          if np.isnan(obj):
              return 0.0
          return float(obj)
      elif isinstance(obj, np.ndarray):
          return obj.tolist()
      else:
          return super(JsonSerializable, self).default(obj)
  
imports: import json
  import numpy
label_desc: Use image node_id 1 for calling the JsonSerializable obj's underlying member method code with example usage: obj.default(obj) and returns: int, int, float, int, obj, super