Skip to content

CBOR support? #5597

@jeremyherbert

Description

@jeremyherbert

It seems that micropython has great support for JSON, but there seems to be not much for CBOR. CBOR is like json but is binary encoded so it is faster, and supports typing of fields (for example, it makes a distinction between byte strings and text strings). It also is very well standardised under RFC 7049: https://tools.ietf.org/html/rfc7049

I personally have found it much more useful than json for sending data over serial links because I don’t need to constantly base64 encoded and decode binary data.

I propose adding a module which wraps the https://github.com/intel/tinycbor library, which is used in a lot of embedded frameworks (mbed, RIOT, etc) which can be added in with a #define. Is this something which is likely to be accepted as a pull request, given that it would add in a new binary library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    extmodRelates to extmod/ directory in source

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions