Scroll to navigation

Catmandu::Serializer::json(3pm) User Contributed Perl Documentation Catmandu::Serializer::json(3pm)

NAME

Catmandu::Serializer - A (de)serializer from and to json

SYNOPSIS

    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

SEE ALSO

Catmandu::Serializer

2024-07-02 perl v5.38.2