at least 5.8
use 5.008;
use strict;
use warnings;
use Mac::AppleScript qw(RunAppleScript);
use JSON::XS;
use Encode qw(encode decode);
use Carp qw(croak);
use Mac::Safari::JavaScript::Exception;
ou return from your JavaScript will be encoded into JSON with
Safari's native C<JSON.stringify> function and decoded on the Perl side
using the JSON::XS module.
JavaScript data structures are mapped
d C<false> to C<undef>, JSON::XS::true
(which you can treat like the scalar C<1>) and JSON::XS::false (which you
can treat like the scalar C<0>) respectivly. Please see L<JSON::XS>
for more informati