KiokuD...e::JSON(3pm)

πŸ“¦
version 0.57 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– 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 a KiokuDB::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 πŸ‘‘


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