Thread Perlscript soll buttons (nicht Typ submit) clicken
(28 answers)
Opened by user23432 at 2013-09-14 08:53
Na also. JSON.
Du kannst doch JSON mit Perl parsen. Code (perl): (dl
)
$perl_scalar = decode_json($json_text_string); Beispiel: U:\>perl -MJSON $json = '{"error":0,"message":"","availability_list":[{"sku":"CM21274801","isAvailable":true,"quantity":"1","message":"1 Available","fmessage":"2 Available on Jan 12, 2014","cssclass":"instock"}]}'; use Data::Dumper; $perldata = decode_json $json; print Dumper \$perldata; ^Z $VAR1 = \{ 'availability_list' => [ { 'isAvailable' => bless( do{\(my $o = 1)}, 'JSON::XS::Boolean' ), 'cssclass' => 'instock', 'sku' => 'CM21274801', 'fmessage' => '2 Available on Jan 12, 2014', 'quantity' => '1', 'message' => '1 Available' } ], 'error' => 0, 'message' => '' }; Last edited: 2013-09-17 13:11:18 +0200 (CEST) |