Group
Extension

Matches 2

Dancer2-Session-DBIC ( H/HO/HORNBURG/Dancer2-Session-DBIC-0.120.tar.gz, HORNBURG, 2018; MetaCPAN )
Dancer2-Session-DBIC/lib/Dancer2/Session/DBIC/Serializer/JSON.pm ( view source; MetaCPAN )
sion::DBIC::Serializer::JSON;

=head1 NAME

Dancer2::Session::DBIC::Serializer::JSON

=head1 DESCRIPTION

Use L<JSON::MaybeXS> serialization for session storage.

=cut

use JSON::MaybeXS;
use Moo;
wit
to JSON.

=cut

sub serialize {
    shift->serializer->encode(shift);
}

sub _build_serializer {
    JSON::MaybeXS->new( shift->serialize_options );
}

=head2 deserialize $json

Deserialize C<$json> t
o Perl objects.

=cut

sub deserialize {
    shift->deserializer->decode(shift);
}

sub _build_deserializer {
    JSON::MaybeXS->new( shift->deserialize_options );
}

1;
Dancer2-Session-DBIC ( H/HO/HORNBURG/Dancer2-Session-DBIC-0.120.tar.gz, HORNBURG, 2018; MetaCPAN )
Dancer2-Session-DBIC/lib/Dancer2/Session/DBIC.pm ( view source; MetaCPAN )
 engine for Dancer2 by serializing the session,
and storing it in a database via L<DBIx::Class>.

JSON was chosen as the default serialization format, as it is fast, terse,
and portable.

=head1 SYNOP
olumn: "my_session_data" # defaults to session_data
          serializer: "YAML"    # defaults to JSON

Or if you are already using L<Dancer2::Plugin::DBIC> and want to use its
existing configuration 
Serializer to use, defaults to JSON.

L<Dancer2::Session::DBIC> provides the following serializer classes:

=over

=item JSON - L<Dancer2::Session::DBIC::Serializer::JSON>

=item Sereal - L<Dancer2::S

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.