#!/usr/bin/perl

use strict;
use warnings;
use JSON;

my $config_filename = '/etc/systemimager/systemimager.json'

my $config_raw_text = do {
	open(my $json_fh, "<:encoding(UTF-8)", $config_filename)
		or die("Can't open \$filename\": $!\n");
	local $/;
	<$json_fh>
};

my $json = JSON->new;
my $config = $json->decode($config_raw_text);

for ( @{$config->{config}} ) {
   print $_->{name}."\n";
}
