Attean...ializer(3pm)

πŸ’– NAME πŸ’–

Okay so this is the Attean...ializer(3pm) page from the User Contributed Perl Documentation, and it's giving very specific serializer-role realness: Attean::API::Serializer β€” the Serializer role. Slay. ✨

🌸 VERSION 🌸

This document describes Attean::API::Serializer version 0.035. Periodt. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

The Attean::API::Serializer role defines a common API for all serializers of typed objects to data β€” either as a byte string or printed to a filehandle. That's the whole vibe: one shared interface, many serializer besties. 🫢

✨ REQUIRED METHODS ✨

The following methods are required by the Attean::API::Serializer role. No skipping, bestie β€” these are mandatory. πŸ‘‘

  • canonical_media_type β€” returns the canonical media type string for the format of this serializer.
  • media_types β€” returns an ARRAY reference of media type strings that also identify the format produced by this serializer.
  • handled_type β€” returns a Type::Tiny object representing the type of items that are consumed during serialization.
  • file_extensions β€” returns an ARRAY reference of file extensions commonly associated with the media types supported by the serializer (and returned by media_types).
🚨 Important little detail: file extensions should NOT include a leading dot. Not .ttl, just ttl energy. Do not come for me, that's literally what it says.
  • serialize_iter_to_io( $fh, $iterator ) β€” serializes the elements from the Attean::API::Iterator $iterator to the IO::Handle object $fh.
  • serialize_iter_to_bytes( $fh ) β€” serializes the elements from the Attean::API::Iterator and returns the serialization as a UTF-8 encoded byte string. (Signature kept exactly as written, bestie. πŸ’–)

πŸŽ€ METHODS πŸŽ€

This role provides default implementations of the following methods. Cute of it, honestly.

  • serialize_list_to_io( $fh, @elements ) β€” serializes the objects in @elements to the IO::Handle object $fh.
  • serialize_list_to_bytes( @elements ) β€” serializes the objects in @elements and returns the serialization as a UTF-8 encoded byte string.

πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests through the GitHub web interface at <https://github.com/kasei/attean/issues>. Do it for the plot. πŸ›βœ¨

πŸ‘€ SEE ALSO πŸ‘€

This section is literally empty in the original β€” no references listed, no extra tea. So we're not inventing any. Periodt. πŸ«–

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams "<gwilliams@cpan.org>" β€” icon behavior, honestly. 🌟

Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


And that's the page, bestie! Footer vibes: perl v5.40.0, dated 2025-01-26 β€” the Attean...ializer(3pm) source/version moment. Go forth and serialize responsibly. πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from