Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

KiokuDB::Backend::Serialize::JSON - Role to serialize entries to JSON strings with

Attributes

       json
           The JSON instance used to encode/decode the JSON.

       pretty
           Whether or not to pass the "pretty" flag to the JSON object after construction.

Author

       Yuval Kogman <nothingmuch@woobling.org>

Description

       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.

Methods

       serialize $entry
           Returns a JSON string

       deserialize $json_str
           Returns a KiokuDB::Entry

Name

       KiokuDB::Backend::Serialize::JSON - Role to serialize entries to JSON strings with
       KiokuDB::Backend::Serialize::JSPON semantics

Synopsis

           with qw(KiokuDB::Backend::Serialize::JSON);

           sub foo {
               my ( $self, $entry ) = @_;

               my $json_string = $self->serialize($entry);
           }

Version

       version 0.57

See Also