class_docstr: JSONMetadata is a type for encoding arbitrary metadata as files.
code: def __init__(self, val: dict) -> None:
      super().__init__()
  
      self.validate(val)
      self._val = val
  
      ext = "." + self.type_name() + ".json"
      tmp_path = os.path.join(MEDIA_TMP.name, runid.generate_id() + ext)
      with codecs.open(tmp_path, "w", encoding="utf-8") as fp:
          util.json_dump_uncompressed(self._val, fp)
      self._set_file(tmp_path, is_tmp=True, extension=ext)
  
file_path: wandb/wandb/sdk/data_types/base_types/json_metadata.py
imports: import codecs
  import os
  from typing import TYPE_CHECKING, Type, Union
  from wandb import util
  from wandb.sdk.lib import runid
  from .._private import MEDIA_TMP
  from .media import Media
label_desc: Use image node_id 1 to create a new JSONMetadata object from inherited base classes: Media with example: obj = JSONMetadata(val)