class_docstr: Any iterable of (label, text_input) pairs qualifies as a ``Dataset``.
class_docstr_tok: ["Any","iterable","of","(","label",",","text_input",")","pairs","qualifies","as","a","``","Dataset","``","."]
docstr: Return dataset in json object format.
docstr_tok: ["Return","dataset","in","json","object","format","."]
code: def dump(self):
      r"""
      Return dataset in json object format.
  
      """
      json_samples = []
      for sample in self.dataset:
          try:
              json_samples.append(sample.dump())
          except ValueError as e:
              logger.error(str(e))
              logger.error("Skip {0} for failed dump.".format(sample))
      return json_samples
  
imports: from tqdm import tqdm
  from ...common.utils import logger
  from ..component.sample import Sample, CnSample
  from ...common.utils.load import task_class_load
  from ...common.settings import SAMPLE_PATH, NLP_TASK_MAP
  from ...common.utils.file_io import read_csv, read_json, save_csv, save_json
label_desc: Use image node_id 9 for calling the Dataset obj's underlying member method code with example usage: obj.dump() and returns: json_samples