1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Fixing passing options to JSON printer.
Author: Andrius Merkys <merkys@debian.org>
Bug: https://github.com/tobyink/p5-spreadsheet-wright/issues/5
--- a/lib/Spreadsheet/Wright/JSON.pm
+++ b/lib/Spreadsheet/Wright/JSON.pm
@@ -72,13 +72,13 @@
if (1 == scalar keys %{$self->{'data'}})
{
$self->{'_FH'}->print(
- to_json($self->{'data'}->{$self->{'_WORKSHEET'}}, $self->{'json_options'})
+ to_json($self->{'data'}->{$self->{'_WORKSHEET'}}, $self->{'options'}{'json_options'})
);
}
else
{
$self->{'_FH'}->print(
- to_json($self->{'data'}, $self->{'json_options'})
+ to_json($self->{'data'}, $self->{'options'}{'json_options'})
);
}
|