JSON parameter and Bicep array - can't match them to work #13839
wi5nia
started this conversation in
Authoring Help
Replies: 2 comments
-
The error message ("Expecting value: line 1 column 2") makes me think that the shell in use is only reading the first line of the JSON value. Can the |
Beta Was this translation helpful? Give feedback.
0 replies
-
As I showed with this command and it's result it read the whole thing without a problem Write-Host "Data Disks Array: ${{ toJson(fromJson(inputs.json_arguments).dataDisksArray) }}" It's the same command used later in the deployment parameter. I've also tried compressing the JSON and exactly the same thing happens :( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm using the newest version of bicep.
This bicep is being deployed within a GitHub Action. The action has a manual dispatch which takes a json structure as an input argument
In that JSON structure I have one parameter which is an array:
There are more parameters in there but just showing one for simplicity.
In my bicep I have a parameter defined as such
And now using Azure CLI in another step in the GitHub Action I deploy want to deploy my template
And no matter how I read, format the reading of dataDiskArray from the JSON structure, I always get this error.
For testing purposes I read even the parameter earlier
And get a correct reading:
![image](https://private-user-images.githubusercontent.com/12593852/317765560-429f8bf4-d830-4aab-a664-48ed1582003e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjE2ODEsIm5iZiI6MTczOTI2MTM4MSwicGF0aCI6Ii8xMjU5Mzg1Mi8zMTc3NjU1NjAtNDI5ZjhiZjQtZDgzMC00YWFiLWE2NjQtNDhlZDE1ODIwMDNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA4MDk0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlNmY0YjAyNWMxZjAxMGE5NWI2ZjE3MmY5ZDIzMmJkNjY1YjkzNzYwNTY4YzEwMmM3ODM3ZTYzNDY3NmRhYmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lTXjS5_WmaWMN5N119aOSCEhPY1zh_yCv4IISVGSzDM)
Any suggestion are welcomed and appreciated!
Beta Was this translation helpful? Give feedback.
All reactions