AWS IoT Device SDK C:
Shadow
AWS IoT Device Shadow library
|
Return to main page ↑ |
Implements JSON parsing functions of the Shadow library. More...
#include "iot_config.h"
#include <stdlib.h>
#include <string.h>
#include "private/aws_iot_shadow_internal.h"
#include "aws_iot_doc_parser.h"
Macros | |
#define | ERROR_DOCUMENT_CODE_KEY "code" |
The JSON key for the error code in a Shadow error document. | |
#define | ERROR_DOCUMENT_CODE_KEY_LENGTH ( sizeof( ERROR_DOCUMENT_CODE_KEY ) - 1 ) |
The length of ERROR_DOCUMENT_CODE_KEY. | |
#define | ERROR_DOCUMENT_MESSAGE_KEY "message" |
The JSON key for the error message in a Shadow error document. | |
#define | ERROR_DOCUMENT_MESSAGE_KEY_LENGTH ( sizeof( ERROR_DOCUMENT_MESSAGE_KEY ) - 1 ) |
The length of ERROR_DOCUMENT_MESSAGE_KEY. | |
Functions | |
static AwsIotShadowError_t | _codeToShadowStatus (uint32_t code) |
Converts a unsigned long to an AwsIotShadowError_t . More... | |
AwsIotShadowError_t | _AwsIotShadow_ParseErrorDocument (const char *pErrorDocument, size_t errorDocumentLength) |
Parse a Shadow error document. More... | |
Implements JSON parsing functions of the Shadow library.
|
static |
Converts a unsigned long
to an AwsIotShadowError_t
.
[in] | code | A value between 400 and 500 to convert. |
code
is unknown. AwsIotShadowError_t _AwsIotShadow_ParseErrorDocument | ( | const char * | pErrorDocument, |
size_t | errorDocumentLength | ||
) |
Parse a Shadow error document.
[in] | pErrorDocument | The error document to parse. |
[in] | errorDocumentLength | The length of pErrorDocument . |