code: def load_json(filename: str) -> Union[BaseLayoutElement, Layout]:
      """Load a JSON file and save it as a layout object with appropriate data types.
  
      Args:
          filename (str):
              The name of the JSON file.
  
      Returns:
          Union[BaseLayoutElement, Layout]:
              Based on the JSON file format, it will automatically parse
              the type of the data and load it accordingly.
      """
      with open(filename, "r") as fp:
          res = json.load(fp)
  
      return load_dict(res)
  
file_path: layout-parser/src/layoutparser/io/basic.py
imports: import ast
  import json
  from typing import List, Union, Dict, Dict, Any
  import pandas
  from ..elements import BaseLayoutElement, TextBlock, Layout, BASECOORD_ELEMENT_NAMEMAP
label_desc: Use image node_id 1 for calling a global function with example usage: load_json(filename) and returns: load_dict