code: def create_table_from_json(
          self,
          json_source,
          table_name="",
          primary_key=None,
          add_primary_key_column=False,
          index_attrs=None,
      ):
          
  
          import pytablereader as ptr
  
          loader = ptr.JsonTableFileLoader(json_source)
          if typepy.is_not_null_string(table_name):
              loader.table_name = table_name
          try:
              for table_data in loader.load():
                  self.__create_table_from_tabledata(
                      table_data, primary_key, add_primary_key_column, index_attrs
                  )
              return
          except (ptr.InvalidFilePathError, IOError):
              pass
  
          loader = ptr.JsonTableTextLoader(json_source)
          if typepy.is_not_null_string(table_name):
              loader.table_name = table_name
          for table_data in loader.load():
              self.__create_table_from_tabledata(
                  table_data, primary_key, add_primary_key_column, index_attrs
              )
docs: Create a table from a JSON file/text.
  
          :param str json_source: Path to the JSON file or JSON text.
          :param str table_name: Table name to create.
          :param str primary_key: |primary_key|
          :param tuple index_attrs: |index_attrs|
  
          :Dependency Packages:
              - `pytablereader <https://github.com/thombashi/pytablereader>`__
  
          :Examples:
              :ref:`example-create-table-from-json`
  
          .. seealso::
              :py:meth:`.pytablereader.JsonTableFileLoader.load`
              :py:meth:`.pytablereader.JsonTableTextLoader.load`