16 #ifndef AZURE_IOT_JSON_READER_H
17 #define AZURE_IOT_JSON_READER_H
25 #include "azure/core/az_json.h"
26 #include "azure/core/_az_cfg_prefix.h"
33 eAzureIoTJSONTokenNONE = AZ_JSON_TOKEN_NONE,
34 eAzureIoTJSONTokenBEGIN_OBJECT = AZ_JSON_TOKEN_BEGIN_OBJECT,
35 eAzureIoTJSONTokenEND_OBJECT = AZ_JSON_TOKEN_END_OBJECT,
36 eAzureIoTJSONTokenBEGIN_ARRAY = AZ_JSON_TOKEN_BEGIN_ARRAY,
37 eAzureIoTJSONTokenEND_ARRAY = AZ_JSON_TOKEN_END_ARRAY,
38 eAzureIoTJSONTokenPROPERTY_NAME = AZ_JSON_TOKEN_PROPERTY_NAME,
39 eAzureIoTJSONTokenSTRING = AZ_JSON_TOKEN_STRING,
40 eAzureIoTJSONTokenNUMBER = AZ_JSON_TOKEN_NUMBER,
41 eAzureIoTJSONTokenTRUE = AZ_JSON_TOKEN_TRUE,
42 eAzureIoTJSONTokenFALSE = AZ_JSON_TOKEN_FALSE,
43 eAzureIoTJSONTokenNULL = AZ_JSON_TOKEN_NULL
53 az_json_reader xCoreReader;
71 const uint8_t * pucBuffer,
72 uint32_t ulBufferSize );
150 uint32_t ulBufferSize,
151 uint32_t * pusBytesCopied );
168 const uint8_t * pucExpectedText,
169 uint32_t ulExpectedTextLength );
182 #include "azure/core/_az_cfg_suffix.h"
struct AzureIoTJSONReader AzureIoTJSONReader_t
The struct to use for Azure IoT JSON reader functionality.
enum AzureIoTJSONTokenType AzureIoTJSONTokenType_t
Defines symbols for the various kinds of JSON tokens that make up any JSON text.
AzureIoTJSONTokenType
Defines symbols for the various kinds of JSON tokens that make up any JSON text.
Definition: azure_iot_json_reader.h:32
AzureIoTResult_t AzureIoTJSONReader_SkipChildren(AzureIoTJSONReader_t *pxReader)
Reads and skips over any nested JSON elements.
AzureIoTResult_t AzureIoTJSONReader_NextToken(AzureIoTJSONReader_t *pxReader)
Reads the next token in the JSON text and updates the reader state.
AzureIoTResult_t AzureIoTJSONReader_TokenType(AzureIoTJSONReader_t *pxReader, AzureIoTJSONTokenType_t *pxTokenType)
Determines type of token currently AzureIoTJSONReader_t points to.
AzureIoTResult_t AzureIoTJSONReader_GetTokenDouble(AzureIoTJSONReader_t *pxReader, double *pxValue)
Gets the JSON token's number as a double.
AzureIoTResult_t AzureIoTJSONReader_Init(AzureIoTJSONReader_t *pxReader, const uint8_t *pucBuffer, uint32_t ulBufferSize)
Initializes an AzureIoTJSONReader_t to read the JSON payload contained within the provided buffer.
AzureIoTResult_t AzureIoTJSONReader_GetTokenInt32(AzureIoTJSONReader_t *pxReader, int32_t *plValue)
Gets the JSON token's number as a 32-bit signed integer.
bool AzureIoTJSONReader_TokenIsTextEqual(AzureIoTJSONReader_t *pxReader, const uint8_t *pucExpectedText, uint32_t ulExpectedTextLength)
Determines whether the unescaped JSON token value that the AzureIoTJSONReader_t points to is equal to...
AzureIoTResult_t AzureIoTJSONReader_GetTokenBool(AzureIoTJSONReader_t *pxReader, bool *pxValue)
Gets the JSON token's boolean value.
AzureIoTResult_t AzureIoTJSONReader_GetTokenString(AzureIoTJSONReader_t *pxReader, uint8_t *pucBuffer, uint32_t ulBufferSize, uint32_t *pusBytesCopied)
Gets the JSON token's string after unescaping it, if required.
Azure IoT FreeRTOS middleware result values.
enum AzureIoTResult AzureIoTResult_t
The results used by the middleware.
The struct to use for Azure IoT JSON reader functionality.
Definition: azure_iot_json_reader.h:50
struct AzureIoTJSONReader::@5 _internal
Internal to the SDK.