input: Write a python function to detect errors in a JSON string.
  assert detect_errors('{"key": "value"}') is None
  assert detect_errors('{"key": value}') is not None
  assert detect_errors('{"key": "value", "key2": 123}') is None
output: import json
  
  def detect_errors(json_string):
      try:
          json.loads(json_string)
          return None
      except json.JSONDecodeError as e:
          return str(e)