title: Sending JSON File to Azure Event Hub
body: <p>I wish to send a JSON file to Azure event hub using the sample code given in Microsoft website. The code looks to be incorrect and not seeing the below uploaded file in event hub.</p>
  <p>Could someone help on how to send the actual JSON file?</p>
  <pre><code>import asyncio
  
  from azure.eventhub import EventData
  from azure.eventhub.aio import EventHubProducerClient
  
  
  async def run():
      producer = EventHubProducerClient.from_connection_string(
          conn_str=&quot;foo&quot;,
          eventhub_name=&quot;boo&quot;)
      async with producer:
          event_data_batch = await producer.create_batch()
          event_data_batch.add(EventData(JSONFilepath))
          await producer.send_batch(event_data_batch)
  
  
  loop = asyncio.get_event_loop()
  loop.run_until_complete(run())
  </code></pre>
  <p>Note: I am not facing error while running the program.</p>