NAME

Bio::Gonzales::Util::Cerial - convenience functions for yaml and json IO

SYNOPSIS

use Bio::Gonzales::Util::Cerial;

# YAML IO
my $yaml_string = yfreeze(\%data);
my $data = ythaw($yaml_string);

yspew($filename, \%data);
my $data = yslurp($filename);

# JSON IO
my $json_string = jfreeze(\%data);
my $data = jthaw($json_string);

jspew($filename, \%data);
my $data = jslurp($filename);

DESCRIPTION

$yaml_string = yfreeze(\%data)

Serialize data structure as yaml string

$data = ythaw($yaml_string)

UNserialize data structure from yaml string

yspew($filename, \%data)

Serialize data structure as yaml string to a file

my $data = yslurp($filename)

UNserialize data structure from yaml file

my $json_string = jfreeze(\%data)

Serialize data structure as json string

my $data = jthaw($json_string)

UNserialize data structure from json string

jspew($filename, \%data)

Serialize data structure as json string to a file

my $data = jslurp($filename)

UNserialize data structure from json file

EXPORT

The following functions are exported by default

ythaw
yfreeze
yslurp
yspew

jthaw
jfreeze
jslurp
jspew

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 244:

'=item' outside of any '=over'

Around line 276:

You forgot a '=back' before '=head1'