input: Write a python function to convert any data format into a JSON format.
  assert convert_to_json('{"name": "John", "age": 30}') == {"name": "John", "age": 30}
  assert convert_to_json('<note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>') == {'to': 'Tove', 'from': 'Jani', 'heading': 'Reminder', 'body': "Don't forget me this weekend!"}
  assert convert_to_json('{"city": "New York", "population": 8175133}') == {"city": "New York", "population": 8175133}
output: def convert_to_json(data):
      import json
      import xml.etree.ElementTree as ET
  
      try:
          # Try to parse as JSON
          return json.loads(data)
      except json.JSONDecodeError:
          pass
      
      try:
          # Try to parse as XML
          root = ET.fromstring(data)
          def xml_to_dict(element):
              return {
                  child.tag: child.text
                  for child in element
              }
          return xml_to_dict(root)
      except ET.ParseError:
          pass
      
      raise ValueError("Unsupported data format")