code: def check_json(code):
      
      try:
          json.loads(code)
      except ValueError as exception:
          message = '{}'.format(exception)
          line_number = 0
  
          found = re.search(r': line\s+([0-9]+)[^:]*$', message)
          if found:
              line_number = int(found.group(1))
  
          yield (int(line_number), message)
docs: Yield errors.