class_docstr: Class for loading json data with batches 
class_docstr_tok: ["Class","for","loading","json","data","with","batches"]
code: def __init__(
      self, path: str, label: str, fields_to_use: list, shuffle=True
  ):
      self.fields_to_use = fields_to_use
      self.shuffle = shuffle
      if os.path.isfile(path):
          raise ValueError("Expected directory path but got file")
      super().__init__(path, label)
  
imports: import glob
  import json
  import os
  from abc import ABC, abstractmethod
  import pandas
label_desc: Use image node_id 1 to create a new JSONBatchLoader object from inherited base classes: BatchLoader with example: obj = JSONBatchLoader(path, label, fields_to_use, shuffle)