I am trying to use curl to submit a request that requires one of the parameters to be an integer. I want to be able to use a variable for that integer, but can't figure out how to do it without it showing up as a string or failing to substitute the variable in.
stringVar="L"
intVar=4
JSON=\''{"stringVar": "'"$stringVar"'","intVar": "'"$intVar"'" }'\'
printf '%s\n' "$JSON"
I have tried all the combinations I can think of of quotes no quotes and braces and can't figure it out.