KiokuD...e::JSON(3pm)
π KiokuDB::Backend::Serialize::JSON π
okay bestie so this is a page from the User Contributed Perl Documentation section, and it's all about KiokuDB::Backend::Serialize::JSON, a role that serializes entries into JSON strings using KiokuDB::Backend::Serialize::JSPON semantics. yes, that's a mouthful, we'll get through it together π«Ά
β¨ VERSION β¨
version 0.57 β no cap, that's the one π
πΈ SYNOPSIS πΈ
the vibe, in code:
with qw(KiokuDB::Backend::Serialize::JSON);
sub foo {
my ( $self, $entry ) = @_;
my $json_string = $self->serialize($entry);
}
π¦ DESCRIPTION π¦
so here's the tea π β this role is the glow-up layer. It gives backends extra convenience attributes and methods for backends that encode entries into JSON strings, and it sits on top of KiokuDB::Backend::Serialize::JSPON, which is the one that only restructures the data (JSPON does the restructuring, this role does the JSON-string-ifying, iykyk).
and like... pro tip: KiokuDB::Backend::Serialize::Delegate is preferred over using this directly. so if you were about to rawdog it, maybe don't π
π METHODS π
serialize $entryβ returns a JSON string β¨deserialize $json_strβ returns aKiokuDB::Entryπ
π ATTRIBUTES π
jsonβ the JSON instance used to encode/decode the JSON. it's literally the whole engine of the operation πprettyβ whether or not to pass the"pretty"flag to the JSON object after construction. yes, it's giving aesthetic. yes, it matters π
π AUTHOR π
Yuval Kogman <nothingmuch@woobling.org> β icon behavior, honestly π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2014 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. (slay, free software fr fr π«Ά)
ngl that's the whole page bestie, no filler, all facts πΈ
perl v5.34.0 Β· 2022-05-23 β that's the version and date stamp from the original footer, so you know exactly which era of this doc you're reading. mwah π β¨
π¦ where this page comes from
- debian bookworm: libkiokudb-perl 0.57-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libkiokudb-perl 0.57-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libkiokudb-perl 0.57-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libkiokudb-perl 0.57-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms