Catman...in_json(3pm)
β¨ NAME β¨
okay so bestie, gather round, we're talking about Catmandu::Fix::marc_in_json from the Catman...in_json page (that's the manual name, she's got a nickname, it's fine π
) β and what she does is turn a Catmandu MARC record into MARC-in-JSON. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
# Transform a Catmandu MARC 'record' into a MARC-in-JSON record
marc_in_json()
# Reverse, transform a MARC-in-JSON record into a Catmandu MARC record
marc_in_json(reverse:1)
see how the second one is giving reverse? yeah. we'll get there. π¦
π DESCRIPTION π
she converts the MARC record into MARC-in-JSON format. no cap, that's literally the job description, and she eats every time. π
π METHODS π
marc_in_json( [OPT1:VAL, OPT2: VAL])
Convert a Catmandu MARC record into the MARC-in-JSON format. lowkey iconic, highkey essential. β¨
π«Ά OPTIONS π«Ά
reverse: 0|1
flip the whole thing around π β converts a MARC-in-JSON record back into the Catmandu MARC format. it's giving main character energy in reverse. π
π§ INLINE π§
not me dropping this Fix straight into a Perl script?? yes bestie, she can do that:
use Catmandu::Fix::marc_in_json as => 'marc_in_json';
my $data = { record => [...] };
$data = marc_in_json($data);
obsessed. truly. π
β SEE ALSO β
Catmandu::Fixβ go read her, she's the whole family π
and that's the tea, bestie π β this was perl v5.38.2, dated 2024-08-03, and yeah the page header still says Catman...in_json(3pm) twice because she's extra like that. slay, periodt, go convert some records. π β¨
π¦ where this page comes from
- debian trixie: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms