NAME

App::Serializer::Scalar - A "serializer" which merely encodes and decodes scalars

SYNOPSIS

use App;

$context = App->context();
$serializer = $context->service("Serializer");  # or ...
$serializer = $context->serializer();
$data = {
    an => 'arbitrary',
    collection => [ 'of', 'data', ],
    of => {
        arbitrary => 'depth',
    },
};
$perl = $serializer->serialize($data);
$data = $serializer->deserialize($perl);
print $serializer->dump($data), "\n";

DESCRIPTION

The Scalar serializer encodes (with serialize()) and decodes with (deserialize()) a scalar. It might be used to encode a binary blob as a hex string and then decode it agains.