title: Encoding Error in Json file when copied from Sharepoint to Azure Blob Storage
body: <p>I have a json file in sharepoint and I am using Logic Apps to get the json file and dump it into blob storage. Further I need to open that json file in Databricks python using this code</p>
  
  <pre><code>blobstring = blob_service.get_blob_to_bytes(INPUTCONTAINERNAME, INPUTFILEPATH)
  myJson = blobstring.decode('utf8')
  data = json.loads(myJson)
  </code></pre>
  
  <p>When I try to open json in python it gives me the following error:</p>
  
  <pre><code>JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig)
  </code></pre>
  
  <p>After using the "utf-8-sig" as decode I get this error </p>
  
  <pre><code>JSONDecodeError: Unterminated string starting at: line 1 column 103775708 
  </code></pre>
  
  <p><strong>IMPORTANT</strong>: When logic app dumps the json from sharepoint on blob, lease state is <strong>expired</strong> on the blob storage. I downloaded the json from blob and uploaded the same file manually (it made the lease state <strong>available</strong>) and the python code opened the json perfectly.</p>
  
  <p>I thought it was an issue with lease state so after logic app dumped the json on blob, I made the lease state available with code (so I don't have to download and upload again manually) and tried to open json but received the same errors again. </p>
  
  <p>In my logic app I am using the <strong>get file content</strong> for getting the file content of the .json file and <strong>create blob</strong> for creating a blob with the file content.</p>
  
  <p>Can anybody point me in the right direction?</p>