input: Write a function to parse a json-formatted string into a dictionary. If the input string is valid, return the dictionary representation of the json string; otherwise, return False.
  assert json_to_dict('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}')=={"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}
  assert json_to_dict('{"name": "Jane","age": 25}')=={"name": "Jane","age": 25}
  assert json_to_dict('Invalid JSON String')==False
  assert json_to_dict('[]')==[]
  assert json_to_dict('{"key": "value", "list": [1, 2, 3]}')=={"key": "value", "list": [1, 2, 3]}
output: import json
  
  def json_to_dict(json_str):
      try:
          return json.loads(json_str)
      except json.JSONDecodeError:
          return False