'', @ret )
}
=item TO_JSON
For compatibility with L<JSON> modules. Convert this object to a hash with keys that correspond to the above methods. Generated ala:
my %json = map { $_ => $self->$_
ersion );
$json{bounds} = $self->bounds( $iter );
With one difference: the keys will only be set if they are defined.
=back
=cut
sub TO_JSON {
my $self = shift;
my %json; #= map {$_
$val = $self->$key;
$json{$key} = $val if defined $val
}
if ( my $bounds = $self->bounds ) {
$json{bounds} = $self->bounds
}
return \%json
}
=over 4
=item save( file