I have a web service that requires a list of arguments in a JSON format. For instance, the JSON it could handle is like this:
{
"args": ["basharg1", "bash arg 2 with spaces", "lastargs"]
}
How can I easily transform the arguments to a bash script to build a string that holds this kind of JSON? That string would then be used by curl to pas it to the web service.