title: ConvertFrom-Json : Invalid JSON primitive:
body: <p>I was trying to run a script that fetches JSON file from CMS endpoint, pass it on the pipeline to convertfrom-json. But, I get an error saying Invalid JSON primitive. </p>
  
  <blockquote>
    <p>ConvertFrom-Json : Invalid JSON primitive: .
    At D:\AzureProject\SetupusingParameterfile.ps1:13 char:75</p>
    
    <blockquote>
      <blockquote>
  <pre><code> $JsonContent = Get-Content $TemplateParameterFileLocal -Raw | Conver ...
  </code></pre>
        
        <p>CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
           + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>Structure of my JSON Parameter file was inline to how Azure Parameter file structure needs to be and sample is as below:-</p>
  
  <pre><code>{
  "$schema": "http://schema.management.azure.com/schemas/20111-01-01/deploymentParameters.json#",
  "contentVersion":"1.0.0.0",
  "parameters": 
          {
              "hostingPlanName": {"value": "pilotHosting"},
              "hostingEnvironment": {"value": "pilotHostingenv"},   
              "serverFarmResourceGroup": {"value": "Pilot1H"},
              "sqlserverName": {"value": "pilotsrvrtrialrun11"},
              "administratorLogin": {"value": "sites1H"},
              "administratorLoginPassword": {"value": "abcdefg"},
              "serverName": {"value": "Pilotwebserver"},
              "databaseUsername": {"value": "pilot1Hattabc"},
              "databasePassword": {"value": "pilotdbabc1H"},
          }
  }
  </code></pre>
  
  <p>Note: The purpose of this post is to share few things that came up during Azure project PoC, and hope to serve someone later.</p>