title: JSONDecodeError: Expecting value: line 1 when using valid json
body: <p>I have been using watchdogs and json for my script where I watch for a file to be created and a json to read the file that has been created. The script is as easy as:</p>
  <pre><code>import watchdog.events
  import watchdog.observers
  import json
  
  def on_created(self, event):
  
      with open(event.src_path, 'r') as f:
          print(f.read())
          data = json.load(f)
  
  
  def main(self):
      observer = watchdog.observers.Observer()
      observer.schedule(NotificationsEvent(), path=os.path.split(self.notificationFlag)[0], recursive=True)
      observer.start()
      try:
          while True:
              time.sleep(1)
      except KeyboardInterrupt:
          observer.stop()
      observer.join()
  </code></pre>
  <p>Basically when there is a new file created with a path of json. Read it and then load is as json and it is working very well but sometimes it throws me an error saying:</p>
  <p>Expecting value: line 1 column 1 (char 0)</p>
  <p>When I check the print for <code>f.read()</code> that returns me:</p>
  <pre><code>{
      &quot;delay&quot;: 0,
      &quot;image&quot;: &quot;https://secure-images.nike.com/is/image/DotCom/CK9388_484&quot;,
      &quot;keyword&quot;: false,
      &quot;link&quot;: &quot;https://www.nike.com/se/t/traningssko-metcon-6-78352H/CK9388-484&quot;,
      &quot;name&quot;: &quot;NIKE METCON 6&quot;,
      &quot;price&quot;: &quot;1337&quot;,
      &quot;shortcut&quot;: [
          &quot;[Checkout](https://www.nike.com/se/cart)&quot;
      ],
      &quot;sizes&quot;: [],
      &quot;sku&quot;: &quot;CK9388-100&quot;,
      &quot;store&quot;: &quot;Nike&quot;,
      &quot;text&quot;: &quot;New!&quot;,
      &quot;webhook&quot;: &quot;nike&quot;
  }
  </code></pre>
  <p>which I have used <a href="https://jsonlint.com/" rel="nofollow noreferrer">https://jsonlint.com/</a> to see if it is valid and it is valid and yet I do get the error sometimes. Which is 1 out of 50 times I do get it. I can't reproduce the error again and it happens very rarely but yet it does happend.</p>
  <p>I have no idea and I am losing my mind of what it could be for issue that causing it :(</p>
  <p>Appreciate all kind of help!</p>