1Attean::API::SerializerU(s3e)r Contributed Perl DocumentaAttitoenan::API::Serializer(3)
2
3
4

NAME

6       Attean::API::Serializer - Serializer role
7

VERSION

9       This document describes Attean::API::Serializer version 0.022
10

DESCRIPTION

12       The Attean::API::Serializer role defines a common API for all
13       serializers of typed objects to data (either a byte string or printed
14       to a filehandle).
15

REQUIRED METHODS

17       The following methods are required by the Attean::API::Serializer role:
18
19       "canonical_media_type"
20           Returns the canonical media type string for the format of this
21           serializer.
22
23       "media_types"
24           Returns an ARRAY reference of media type strings that also identify
25           the format produced by this serializer.
26
27       "handled_type"
28           Returns a Type::Tiny object representing the type of items that are
29           consumed during serialization.
30
31       "serialize_iter_to_io( $fh, $iterator )"
32           Serializes the elements from the Attean::API::Iterator $iterator to
33           the IO::Handle object $fh.
34
35       "serialize_iter_to_bytes( $fh )"
36           Serializes the elements from the Attean::API::Iterator $iterator
37           and returns the serialization as a UTF-8 encoded byte string.
38

METHODS

40       This role provides default implementations of the following methods:
41
42       "serialize_list_to_io( $fh, @elements )"
43           Serializes the objects in @elements to the IO::Handle object $fh.
44
45       "serialize_list_to_bytes( @elements )"
46           Serializes the objects in @elements and returns the serialization
47           as a UTF-8 encoded byte string.
48

BUGS

50       Please report any bugs or feature requests to through the GitHub web
51       interface at <https://github.com/kasei/attean/issues>.
52

SEE ALSO

AUTHOR

55       Gregory Todd Williams  "<gwilliams@cpan.org>"
56
58       Copyright (c) 2014--2019 Gregory Todd Williams.  This program is free
59       software; you can redistribute it and/or modify it under the same terms
60       as Perl itself.
61
62
63
64perl v5.28.1                      2019-03-21        Attean::API::Serializer(3)
Impressum