use strict; use warnings; use JSON; use URI::Escape; my $json_string = JSON::to_json($perl_structure); print URI::Escape::uri_escape($json_string); #### https://example.com/api/v1/dosomething?name=test+name&file_ids[]=1&file_ids[]=2&sub[name]=foo&sub[message]=bar