Catmandu::Serializer - A (de)serializer from and to json
package MyPackage; use Moo; with 'Catmandu::Serializer'; # You have now serialize and deserialize methods available package main; my $obj = MyPackage->new; my $obj = MyPackage->new(serializer => 'json'); $obj->serialize( { foo => 'bar' } ); # JSON $obj->deserialize( "{'foo':'bar'}" ); # Perl
Catmandu::Serializer
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.