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.2 by root, Thu Nov 28 10:16:50 2013 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
72

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines