NAME
CBOR::PP::Decode
SYNOPSIS
my $perlvar = CBOR::PP::Decode::decode($binary);
DESCRIPTION
This implements a basic CBOR decoder in pure Perl.
MAPPING CBOR TO PERL
All tags are ignored. (This could be iterated on later.)
Indefinite-length objects are supported, but streamed parsing is not; the data structure must be complete to be decoded.
Binary and UTF-8 strings are decoded as Perl represents them. Note that UTF-8 string decoding is a bit slower.
null, undefined, true, and false become undef, undef, Types::Serialiser::true(), and Types::Serialiser::false(), respectively. (NB: undefined is deserialized as an error object in CBOR::XS, which doesn’t seem to make sense.)
TODO
Add tag decode support via callbacks.
Make it faster by removing some of the internal buffer copying.
AUTHOR
Gasper Software Consulting (FELIPE)
LICENSE
This code is licensed under the same license as Perl itself.
METHODS
$value = decode( $CBOR_BYTESTRING )
Returns a Perl value that represents the serialized CBOR string.