input: Write a function to parse a json-formatted string into a dictionary. If the input string is not a valid json, return None and print an error message.
  assert json_parser('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}')=={'name': 'John', 'age': 30, 'address': {'city': 'New York', 'state': 'NY'}}
  assert json_parser('Invalid JSON String')==None
output: import json
  
  def json_parser(json_str):
      try:
          return json.loads(json_str)
      except json.JSONDecodeError:
          print("Error: Invalid JSON string")
          return None