input: Write a python function to construct a list of subjects from a dataset directory where the subjects meet the conditions specified in a JSON file.
  ```python
  import os
  import json
  import sct_utils as sct
  
  def generate_data_list(folder_dataset, json_requirements=None, verbose=1):
      data_subjects, subjects_dir = []
  
      for subject_dir in os.listdir(folder_dataset):
          if not subject_dir.startswith('.') and os.path.isdir(folder_dataset + subject_dir):
              if read_json(folder_dataset + subject_dir, json_requirements=json_requirements):
                  data_subjects.append(folder_dataset + subject_dir + '/')
                  subjects_dir.append(subject_dir)
  
      if not data_subjects:
          sct.printv('ERROR: No subject data were found in ' + folder_dataset + '. '
                     'Please organize your data correctly or provide a correct dataset.',
                     verbose=verbose, type='error')
  
      return data_subjects, subjects_dir
  
  def read_json(path_dir, json_requirements=None, fname_json='dataset_description.json'):
      path_dir = sct.slash_at_the_end(path_dir, slash=1)
      if fname_json not in os.listdir(path_dir) and json_requirements is not None:
          accept_subject = False
      elif json_requirements is None:
          accept_subject = True
      else:
          json_file = open(path_dir+fname_json)
          dic_info = json.load(json_file)
          json_file.close()
          dic_info = dict((k.lower(), v.lower()) for k, v in dic_info.iteritems())
          accept_subject = True
          list_conditions = json_requirements.split(',')
          for condition in list_conditions:
              key, val = condition.split('=')
              key, val = key.lower(), val.lower()
              if key not in dic_info.keys():
                  accept_subject = False
              elif dic_info[key] != val:
                  accept_subject = False
  
      return accept_subject
  
  # Test cases
  assert generate_data_list('path_to_dataset', 'center=unf,study=errsm') == (['path_to_dataset/subject_name_01/', 'path_to_dataset/subject_name_02/'], ['subject_name_01', 'subject_name_02'])
  assert generate_data_list('path_to_dataset', 'center=abc') == ([], [])
  assert generate_data_list('path_to_dataset', None) == (['path_to_dataset/subject_name_01/', 'path_to_dataset/subject_name_02/', 'path_to_dataset/subject_name_03/'], ['subject_name_01', 'subject_name_02', 'subject_name_03'])
output: def generate_data_list(folder_dataset, json_requirements=None, verbose=1):
      data_subjects, subjects_dir = [], []
  
      for subject_dir in os.listdir(folder_dataset):
          if not subject_dir.startswith('.') and os.path.isdir(os.path.join(folder_dataset, subject_dir)):
              if read_json(os.path.join(folder_dataset, subject_dir), json_requirements=json_requirements):
                  data_subjects.append(os.path.join(folder_dataset, subject_dir) + '/')
                  subjects_dir.append(subject_dir)
  
      if not data_subjects:
          sct.printv('ERROR: No subject data were found in ' + folder_dataset + '. '
                     'Please organize your data correctly or provide a correct dataset.',
                     verbose=verbose, type='error')
  
      return data_subjects, subjects_dir
  
  def read_json(path_dir, json_requirements=None, fname_json='dataset_description.json'):
      path_dir = sct.slash_at_the_end(path_dir, slash=1)
      if fname_json not in os.listdir(path_dir) and json_requirements is not None:
          accept_subject = False
      elif json_requirements is None:
          accept_subject = True
      else:
          with open(os.path.join(path_dir, fname_json)) as json_file:
              dic_info = json.load(json_file)
          dic_info = {k.lower(): v.lower() for k, v in dic_info.items()}
          accept_subject = True
          list_conditions = json_requirements.split(',')
          for condition in list_conditions:
              key, val = condition.split('=')
              key, val = key.lower(), val.lower()
              if key not in dic_info.keys() or dic_info[key] != val:
                  accept_subject = False
  
      return accept_subject