… | |
… | |
26 | substr $many_cbor_strings, 0, $length, ""; # remove decoded cbor string |
26 | substr $many_cbor_strings, 0, $length, ""; # remove decoded cbor string |
27 | } |
27 | } |
28 | |
28 | |
29 | =head1 DESCRIPTION |
29 | =head1 DESCRIPTION |
30 | |
30 | |
31 | WARNING! THIS IS A PRE-ALPHA RELEASE! IT WILL CRASH, CORRUPT YOUR DATA |
31 | WARNING! This module is very new, and not very well tested (that's up to |
32 | AND EAT YOUR CHILDREN! (Actually, apart from being untested and a bit |
32 | you to do). Furthermore, details of the implementation might change freely |
33 | feature-limited, it might already be useful). |
33 | before version 1.0. And lastly, the object serialisation protocol depends |
|
|
34 | on a pending IANA assignment, and until that assignment is official, this |
|
|
35 | implementation is not interoperable with other implementations (even |
|
|
36 | future versions of this module) until the assignment is done. |
|
|
37 | |
|
|
38 | You are still invited to try out CBOR, and this module. |
34 | |
39 | |
35 | This module converts Perl data structures to the Concise Binary Object |
40 | This module converts Perl data structures to the Concise Binary Object |
36 | Representation (CBOR) and vice versa. CBOR is a fast binary serialisation |
41 | Representation (CBOR) and vice versa. CBOR is a fast binary serialisation |
37 | format that aims to use a superset of the JSON data model, i.e. when you |
42 | format that aims to use a superset of the JSON data model, i.e. when you |
38 | can represent something in JSON, you should be able to represent it in |
43 | can represent something in JSON, you should be able to represent it in |
39 | CBOR. |
44 | CBOR. |
40 | |
45 | |
41 | This makes it a faster and more compact binary alternative to JSON, with |
46 | In short, CBOR is a faster and very compact binary alternative to JSON, |
42 | the added ability of supporting serialising of perl objects. |
47 | with the added ability of supporting serialisation of Perl objects. |
43 | |
48 | |
44 | The primary goal of this module is to be I<correct> and the secondary goal |
49 | The primary goal of this module is to be I<correct> and the secondary goal |
45 | is to be I<fast>. To reach the latter goal it was written in C. |
50 | is to be I<fast>. To reach the latter goal it was written in C. |
46 | |
51 | |
47 | See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and |
52 | See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and |
… | |
… | |
51 | |
56 | |
52 | package CBOR::XS; |
57 | package CBOR::XS; |
53 | |
58 | |
54 | use common::sense; |
59 | use common::sense; |
55 | |
60 | |
56 | our $VERSION = 0.04; |
61 | our $VERSION = 0.05; |
57 | our @ISA = qw(Exporter); |
62 | our @ISA = qw(Exporter); |
58 | |
63 | |
59 | our @EXPORT = qw(encode_cbor decode_cbor); |
64 | our @EXPORT = qw(encode_cbor decode_cbor); |
60 | |
65 | |
61 | use Exporter; |
66 | use Exporter; |