input: Write a python function to convert a dictionary to a JSON string.
  assert dict_to_json({"name": "John", "age": 42}) == '{"name": "John", "age": 42}'
  assert dict_to_json({"city": "New York", "population": 8000000}) == '{"city": "New York", "population": 8000000}'
  assert dict_to_json({}) == '{}'
output: def dict_to_json(d):
      import json
      return json.dumps(d)