Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: sht15_remote_monitoring f767zi_mqtt remote_monitoring simplesample_amqp ... more
jsonencoder.h@4:233dd7616d73, 2015-10-22 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Thu Oct 22 18:33:28 2015 -0700
- Revision:
- 4:233dd7616d73
- Parent:
- 0:1f9b2707ec7d
- Child:
- 10:c2aee3965a83
v1.0.0-preview.4
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| AzureIoTClient | 0:1f9b2707ec7d | 1 | // Copyright (c) Microsoft. All rights reserved. |
| AzureIoTClient | 0:1f9b2707ec7d | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| AzureIoTClient | 0:1f9b2707ec7d | 3 | |
| AzureIoTClient | 0:1f9b2707ec7d | 4 | #ifndef JSONENCODER_H |
| AzureIoTClient | 0:1f9b2707ec7d | 5 | #define JSONENCODER_H |
| AzureIoTClient | 0:1f9b2707ec7d | 6 | |
| AzureIoTClient | 0:1f9b2707ec7d | 7 | #include "macro_utils.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 8 | #include "strings.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 9 | |
| AzureIoTClient | 0:1f9b2707ec7d | 10 | #ifdef __cplusplus |
| AzureIoTClient | 0:1f9b2707ec7d | 11 | #include "cstddef" |
| AzureIoTClient | 0:1f9b2707ec7d | 12 | extern "C" { |
| AzureIoTClient | 0:1f9b2707ec7d | 13 | #else |
| AzureIoTClient | 0:1f9b2707ec7d | 14 | #include "stddef.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 15 | #endif |
| AzureIoTClient | 0:1f9b2707ec7d | 16 | |
| AzureIoTClient | 0:1f9b2707ec7d | 17 | #include "multitree.h" |
| AzureIoTClient | 0:1f9b2707ec7d | 18 | |
| AzureIoTClient | 0:1f9b2707ec7d | 19 | #define JSON_ENCODER_RESULT_VALUES \ |
| AzureIoTClient | 0:1f9b2707ec7d | 20 | JSON_ENCODER_OK, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 21 | JSON_ENCODER_INVALID_ARG, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 22 | JSON_ENCODER_ALREADY_EXISTS, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 23 | JSON_ENCODER_MULTITREE_ERROR, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 24 | JSON_ENCODER_TOSTRING_FUNCTION_ERROR, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 25 | JSON_ENCODER_ERROR |
| AzureIoTClient | 0:1f9b2707ec7d | 26 | |
| AzureIoTClient | 0:1f9b2707ec7d | 27 | DEFINE_ENUM(JSON_ENCODER_RESULT, JSON_ENCODER_RESULT_VALUES); |
| AzureIoTClient | 0:1f9b2707ec7d | 28 | |
| AzureIoTClient | 0:1f9b2707ec7d | 29 | #define JSON_ENCODER_TOSTRING_RESULT_VALUES \ |
| AzureIoTClient | 0:1f9b2707ec7d | 30 | JSON_ENCODER_TOSTRING_OK, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 31 | JSON_ENCODER_TOSTRING_INVALID_ARG, \ |
| AzureIoTClient | 0:1f9b2707ec7d | 32 | JSON_ENCODER_TOSTRING_ERROR |
| AzureIoTClient | 0:1f9b2707ec7d | 33 | |
| AzureIoTClient | 0:1f9b2707ec7d | 34 | DEFINE_ENUM(JSON_ENCODER_TOSTRING_RESULT, JSON_ENCODER_TOSTRING_RESULT_VALUES); |
| AzureIoTClient | 0:1f9b2707ec7d | 35 | |
| AzureIoTClient | 0:1f9b2707ec7d | 36 | typedef JSON_ENCODER_TOSTRING_RESULT(*JSON_ENCODER_TOSTRING_FUNC)(STRING_HANDLE, const void* value); |
| AzureIoTClient | 0:1f9b2707ec7d | 37 | |
| AzureIoTClient | 0:1f9b2707ec7d | 38 | extern JSON_ENCODER_TOSTRING_RESULT JSONEncoder_CharPtr_ToString(STRING_HANDLE, const void* value); |
| AzureIoTClient | 0:1f9b2707ec7d | 39 | extern JSON_ENCODER_RESULT JSONEncoder_EncodeTree(MULTITREE_HANDLE treeHandle, STRING_HANDLE destination, JSON_ENCODER_TOSTRING_FUNC toStringFunc); |
| AzureIoTClient | 0:1f9b2707ec7d | 40 | |
| AzureIoTClient | 0:1f9b2707ec7d | 41 | #ifdef __cplusplus |
| AzureIoTClient | 0:1f9b2707ec7d | 42 | } |
| AzureIoTClient | 0:1f9b2707ec7d | 43 | #endif |
| AzureIoTClient | 0:1f9b2707ec7d | 44 | |
| AzureIoTClient | 0:1f9b2707ec7d | 45 | |
| AzureIoTClient | 0:1f9b2707ec7d | 46 | #endif /* JSONENCODER_H */ |
