It's not strict enough to be really useful
Alternative format is pipe (|) separated text files with extension .txt
First column is always header with field names
Multi-line values should be wrapped in ^multi-line-text^
-Multiple values for one field are supported for: number, number
Start with:
}
my $item;
foreach my $i ( 0 .. $#v ) {
- my $v = $v[$i];
- # unpack numeric values separated by commas
- my $a = $v =~ m/\d+\s*,\s*\d+/ ? [ split(/\,\s*/,$v) ] : [ $v ];
- $item->{ $header[$i] || "f_$i" } = $a;
+ $item->{ $header[$i] || "f_$i" } = [ $v[$i] ];
}
push @{ $data->{items} }, $item;
}