libjson-tiny-perl/examples/json_tiny.pl

10 lines
177 B
Perl
Raw Permalink Normal View History

2018-03-27 21:25:33 +02:00
use JSON::Tiny 'j';
my @json
= split /-{4}/, do { open my $fh, '<sample.json'; local $/ = undef; <$fh> };
sub json_tiny { [ map { j $_ } @json ]; }
my $value = json_tiny;