--- CBOR-XS/doc/perl-object.pod 2013/11/26 09:43:39 1.1 +++ CBOR-XS/doc/perl-object.pod 2013/11/28 10:16:50 1.2 @@ -1,6 +1,6 @@ =head1 REGISTRATION INFORMATION - Tag + Tag 26 Data Item array [classname, constructargs...] Semantics Serialised Perl object with classname and constructor arguments Reference http://cbor.schmorp.de/perl-object @@ -12,8 +12,8 @@ CBOR. The tagged value must be a CBOR array with at least one element. The first -element specifies a classname to use in Perl (it can, but does not need -to be a string). +element specifies a classname to use in Perl (it can, but does not need to +be a string - the stringified form will be used as classname). The encoder and decoder should serialise/deserialise the object using the Types::Serialiser object serialisation protocol. For this, the object's @@ -30,7 +30,13 @@ Example of a hypothetical My::DateTime representation using a unix timestamp: - tag(["My::DateTime", 12345678]) + 26(["My::DateTime", 12345678]) + + d8 1a # tag(26) + 82 # array(2) + 6c # text(12) + 4d793a3a4461746554696d65 # "My::DateTime" + 1a 00bc614e # unsigned(12345678) Example of the corresponding FREEZE method: