Home | History | Annotate | Line # | Download | only in api
      1 Encoding
      2 =============================
      3 
      4 The easiest way to encode data items is using the :func:`cbor_serialize` or :func:`cbor_serialize_alloc` functions:
      5 
      6 .. doxygenfunction:: cbor_serialize
      7 .. doxygenfunction:: cbor_serialize_alloc
      8 
      9 Type-specific serializers
     10 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     11 In case you know the type of the item you want to serialize beforehand, you can use one
     12 of the type-specific serializers.
     13 
     14 .. note:: Unless compiled in debug mode, these do not verify the type. Passing an incorrect item will result in an undefined behavior.
     15 
     16 .. doxygenfunction:: cbor_serialize_uint
     17 .. doxygenfunction:: cbor_serialize_negint
     18 .. doxygenfunction:: cbor_serialize_bytestring
     19 .. doxygenfunction:: cbor_serialize_string
     20 .. doxygenfunction:: cbor_serialize_array
     21 .. doxygenfunction:: cbor_serialize_map
     22 .. doxygenfunction:: cbor_serialize_tag
     23 .. doxygenfunction:: cbor_serialize_float_ctrl
     24