libjson-tiny-perl/examples/json_tiny.pl
2018-03-27 21:25:33 +02:00

10 lines
177 B
Perl

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;