ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CBOR-XS/doc/indirection.pod
(Generate patch)

Comparing CBOR-XS/doc/indirection.pod (file contents):
Revision 1.1 by root, Tue Nov 26 09:43:39 2013 UTC vs.
Revision 1.3 by root, Tue Dec 27 21:24:33 2016 UTC

44Indirection tags can be nested - each additional level of nesting would 44Indirection tags can be nested - each additional level of nesting would
45indicate an additional indirection. 45indicate an additional indirection.
46 46
47=head1 EXAMPLES 47=head1 EXAMPLES
48 48
49<TBD> 49The following Perl data structure is an array containing a reference to an
50array, followed by a reference to a string:
50 51
52 [[], \"string"]
53
54Since Perl cannot have "naked" arrays or maps inside another data
55structure, but only a reference to it, the natural encoding of this
56data structure uses a normal array for the array-reference (i.e. it
57omits the reference). The string reference is uncommon but valid, and
58not the natural way to store a string inside another data structure. An
59encoder might therefore chose to encode this string reference using the
60indirection tag:
61
62 256([[], 22098("string")])
63
64 d9 0100 # tag(256)
65 82 # array(2)
66 80 # array(0)
67 d9 5652 # tag(22098)
68 66 # text(6)
69 737472696e67 # "string"
70
71=head1 IMPLEMENTATIONS
72
73This section lists known implementations of this extension (L<drop me a
74mail|mailto:cbor@schmorp.de?Subject=CBOR-indirection> if you want to be
75listed here).
76
77=over 4
78
79=item * [Perl] L<CBOR::XS|http://software.schmorp.de/pkg/CBOR-XS.html> (reference implementation)
80
81=back
82

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines