… | |
… | |
138 | The following cyclic Perl data structure references itself from within |
138 | The following cyclic Perl data structure references itself from within |
139 | itself. Here a decoder will see a reference to the shared value I<before> |
139 | itself. Here a decoder will see a reference to the shared value I<before> |
140 | it has completely decoded the shared value: |
140 | it has completely decoded the shared value: |
141 | |
141 | |
142 | $data = []; |
142 | $data = []; |
143 | $data->[0] = $data; # make the first array eleemnt refer to the array |
143 | $data->[0] = $data; # make the first array element refer to the array |
144 | |
144 | |
145 | This data structure is not representable in standard CBOR. Using the value |
145 | This data structure is not representable in standard CBOR. Using the value |
146 | sharing extension, it can be encoded as follows: |
146 | sharing extension, it can be encoded as follows: |
147 | |
147 | |
148 | 28([29(0)]) |
148 | 28([29(0)]) |