input: Write a function to parse a json-formatted string into a dictionary. Implement it such that you load the data using the `json` module and convert it into a dict object.
  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('{"fruit": "apple","color": "red","quantity": 5}') == {'fruit': 'apple', 'color': 'red', 'quantity': 5}
  assert json_parser('{}') == {}
  assert json_parser('[]') == []
  assert json_parser('null') == None
output: import json
  
  def json_parser(json_str):
      return json.loads(json_str)