input: Write a function to parse a json-formatted string into a dictionary.
  
  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('{"fruit": "apple","color": "red"}')=={'fruit': 'apple', 'color': 'red'}
  assert parse_json('{"book": "Python Programming","author": "Mark Lutz"}')=={'book': 'Python Programming', 'author': 'Mark Lutz'}
  assert parse_json('{}')=={}
  assert parse_json('{"numbers": [1, 2, 3]}')=={'numbers': [1, 2, 3]}
output: def parse_json(json_str):
      import json
      return json.loads(json_str)