Diffusion C API
6.2.9
|
Utilities for converting CBOR-encoded data to JSON string representation. More...
Functions | |
DEPRECATED (BUF_T *cbor_to_json(const char *cbor, size_t len)) | |
Convert binary (CBOR) data to a JSON string. More... | |
Utilities for converting CBOR-encoded data to JSON string representation.
Copyright © 2017 Push Technology Ltd., All Rights Reserved.
Use is subject to license terms.
NOTICE: All information contained herein is, and remains the property of Push Technology. The intellectual and technical concepts contained herein are proprietary to Push Technology and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret or copyright law.
DEPRECATED | ( | BUF_T * | cbor_to_jsonconst char *cbor, size_t len | ) |
Convert binary (CBOR) data to a JSON string.
This function is useful for converting data received on a JSON topic from CBOR representation to a JSON string suitable for passing to a 3rd party JSON parser.
Note that this is introducing an extra step (i.e., CBOR -> string -> JSON) and if possible, you should read the CBOR tokens and convert them directly to JSON representation using facilities provided by your JSON library.
cbor | A pointer to memory containing CBOR-encoded data. |
len | The length of the CBOR-encoded data. |