KiokuDB::Backend::Serialize::JSON - Role to serialize entries to JSON strings with KiokuDB::Backend::Serialize::JSPON semantics
version 0.56
with qw(KiokuDB::Backend::Serialize::JSON); sub foo { my ( $self, $entry ) = @_; my $json_string = $self->serialize($entry); }
This role provides additional convenience attributes and methods for backends that encode entries to JSON strings, on top of KiokuDB::Backend::Serialize::JSPON which only restructures the data.
KiokuDB::Backend::Serialize::Delegate is preferred to using this directly.
Returns a JSON string
Returns a KiokuDB::Entry
The JSON instance used to encode/decode the JSON.
Whether or not to pass the pretty flag to the JSON object after construction.
pretty
Yuval Kogman <nothingmuch@woobling.org>
This software is copyright (c) 2013 by Yuval Kogman, Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install KiokuDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KiokuDB
CPAN shell
perl -MCPAN -e shell install KiokuDB
For more information on module installation, please visit the detailed CPAN module installation guide.