Created
December 14, 2015 18:22
-
-
Save paveljurca/d5ef24e5c9de58303375 to your computer and use it in GitHub Desktop.
make JSON to URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
my $param; | |
while (<DATA>) { | |
chomp; | |
#s/^\s+|\s+$/g; | |
$param .= (join "=", split /:/)."&"; | |
} | |
$param =~ s/[\s',]+//g; | |
chop($param); # cutting the last '&' | |
print $param . "\n"; | |
__DATA__ | |
site: '30', | |
realSite: '30', | |
subsite: '746', | |
autoStart: '1', | |
autoSound: '0', | |
section: '3607', | |
media: '1741518', | |
mute: '0', | |
size: '', | |
pWidth: 600, | |
pHeight: 383, | |
counter: '13260', | |
jsVar: 'vjsconfig13260', | |
pid: 'vjsplayer_13260', | |
revision: '158978', | |
fallback: useFlowplayer13260 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment