The proper way to create JSON strings is to first create a data structure in Perl that matches the desired output structure, and then run it through a JSON module like JSON or JSON::XS:
use JSON qw/encode_json/; my $data = { auth => { "RAX-KSKEY:apiKeyCredentials" => { username => $USERNAME, apiKey => $API_KEY, }, }, }; my $json = encode_json($data);
In reply to Re: Interpolating variables in JSON string
by moritz
in thread Interpolating variables in JSON string
by reisinge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |