Catman...in_json(3pm)

πŸ“¦
version 1.320 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ 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