input: Write a function to parse a json-formatted string into a dictionary. If the input string is not valid json, return None.
  assert parse_json('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}') == {'name': 'John', 'age': 30, 'address': {'city': 'New York', 'state': 'NY'}}
  assert parse_json('{"name": "John","age", 30}') == None
output: try:
      import json
      return json.loads(s)
  except json.JSONDecodeError:
      return None