input: Write a function to parse a json-formatted string into a dictionary. If the input string is not in valid json format, an appropriate exception should be raised. The function should take a single argument, the json-formatted string, and return a dictionary. If the input string is empty, the function should return an empty dictionary.
  import json
  
  def parse_json_to_dict(json_string):
      if not json_string:
          return {}
      return json.loads(json_string)
  
  assert parse_json_to_dict('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}')=={"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}
  assert parse_json_to_dict('{"fruit": "apple","color": "red"}')=={"fruit": "apple","color": "red"}
  assert parse_json_to_dict('')=={}
  assert parse_json_to_dict('["apple", "banana", "cherry"]')==["apple", "banana", "cherry"]
  assert parse_json_to_dict('{"name": "Jane","age": null}')=={"name": "Jane","age": None}
output: 
  import json
  
  def parse_json_to_dict(json_string):
      if not json_string:
          return {}
      return json.loads(json_string)
  