我有一个JSON文件,我试图在Perl中解析它.到目前为止,我有:
use strict;
use warnings;
use JSON;
open my $fh, "/Users/arjunnayini/Desktop/map_data.json";
my @decoded_json = @{decode_json($fh)};
Run Code Online (Sandbox Code Playgroud)
但我得到一个错误,我有一个:"格式错误的JSON字符串,无论是数组,对象,数字,字符串还是原子,字符偏移0(在"GLOB(0x100804ed0)"之前)"
我很确定JSON文件格式正确,所以我不确定这是哪里出错的.有什么建议?