; # returns false
=item * json
You can pass in a json string which will be parsed and used to populate the new
object. For example:
$results = Process::Results->new(json=>'{"errors":[{"id":"no-fil
<success> proeperty.
=head2 json()
C<< $results-E<gt>json() >> returns a JSON representation of the results object.
That's all, it takes no params, it just returns a JSON string.
OK, one minor thin
g to note is that the C<success> property is set to the JSON
value of C<true> or C<false>. Other then that, nothing complicated.
=head1 TERMS AND CONDITIONS
Copyright (c) 2016 by Miko O'Sullivan. Al
package Process::Results;
use strict;
use Carp 'croak';
use B;
use JSON::Tiny;
# debug tools
# use Debug::ShowStuff ':all';
# use Debug::ShowStuff::ShowVar;
# version
our $VERSION = '0.2';
# config
; # returns false
=item * json
You can pass in a json string which will be parsed and used to populate the new
object. For example:
$results = Process::Results->new(json=>'{"errors":[{"id":"no-fil
ults') {
return $opts{'results'};
}
}
# if json was sent, parse it
if ( $opts{'json'} ) {
$results = JSON::Tiny::decode_json($opts{'json'});
}
# else just create empty hashref
else {