KiokuDB::Backend::Serialize::JSON(3pm)

KiokuDB::Backend::Serialize::JSON3pm

Role to serialize entries to json strings with kiokudb::backend::serialize::jspon semantics

Usage

    with qw(KiokuDB::Backend::Serialize::JSON);
    sub foo {
        my ( $self, $entry ) = @_;
        my $json_string = $self->serialize($entry);
    }

Version

version 0.57

Overview

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

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.

Releases

6 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8–10
  3. 12–13

Author

Yuval Kogman <[email protected]>

From libkiokudb-perl 0.57-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.