$self->serial_format($1);
}
else {
$self->serial_format('json');
}
}
# this ISA trickery has 2 benefits:
# (1) a default new() method
should serialized Perl values be assumed to be? The default is C<yaml>.
You might also specify C<json>. If you have serialized values in some other format,
then you'll need to subclass SWISH::API::Ob
strict;
use warnings;
use base qw( SWISH::API::More::Results );
use Carp;
use YAML::Syck ();
use JSON::Syck ();
our $VERSION = '0.14';
*next = \&next_result;
sub next_result {
my $self = shift
ize\n$v";
}
return $s;
}
elsif ( $f eq 'json' && $v =~ m/^[\{\[\"]/o ) {
my $s;
eval { $s = JSON::Syck::Load($v); };
if ($@) {
croak "$@\nca