json.h File Reference

Json module header file. More...

#include "data_types.h"
#include "event_list.h"
Include dependency graph for json.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

E_MCL_ERROR_CODE json_from_item_meta (item_meta_t *item_meta, string_t **json_string)
 Creates item meta part of all types in json format. More...
 
E_MCL_ERROR_CODE json_from_time_series_payload (time_series_payload_t *payload, string_t **json_string)
 Creates payload part of time series in json format. More...
 
E_MCL_ERROR_CODE json_from_data_source_configuration_payload (data_source_configuration_payload_t *payload, string_t **json_string)
 Creates payload part of data source configuration in json format. More...
 
E_MCL_ERROR_CODE json_from_event_payload (list_t *event_list_payload, string_t **json_string)
 Creates payload part of event set in json format. More...
 

Detailed Description

Json module header file.


Date
Jul 14, 2016 This module creates json strings for all data types. Also it builds event list from json.

Definition in file json.h.

Function Documentation

E_MCL_ERROR_CODE json_from_data_source_configuration_payload ( data_source_configuration_payload_t payload,
string_t **  json_string 
)

Creates payload part of data source configuration in json format.

Parameters
[in]payloadPayload fields of data source configuration is stored in this struct.
[out]json_stringJson string filled with meta part of the related item.
Returns

Definition at line 104 of file json.c.

References _add_data_source_configuration_data_sources(), string_t::buffer, data_source_configuration_payload_t::configuration_id, data_source_configuration_payload_t::data_sources, DEBUG_ENTRY, DEBUG_LEAVE, JSON_OBJECT, json_util_add_string(), json_util_destroy(), json_util_initialize(), json_util_to_string(), MCL_DEBUG, MCL_NULL, MCL_OK, PAYLOAD_FIELD_CONFIGURATION_ID, payload_field_names, and string_initialize_dynamic().

Referenced by _exchange_prepare_data().

Here is the call graph for this function:

Here is the caller graph for this function:

E_MCL_ERROR_CODE json_from_event_payload ( list_t event_list_payload,
string_t **  json_string 
)

Creates payload part of event set in json format.

Parameters
[in]event_list_payloadPayload fields of event list is stored in this list.
[in]json_stringJson string filled with meta part of the related item.
Returns

Definition at line 129 of file json.c.

References _add_event_list(), ASSERT_CODE_MESSAGE, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, JSON_ARRAY, json_util_destroy(), json_util_initialize(), json_util_to_string(), MCL_DEBUG, MCL_NULL, MCL_OK, and string_initialize_dynamic().

Referenced by _exchange_prepare_data().

Here is the call graph for this function:

Here is the caller graph for this function:

E_MCL_ERROR_CODE json_from_item_meta ( item_meta_t item_meta,
string_t **  json_string 
)

Creates item meta part of all types in json format.

Parameters
[in]item_metaMeta fields of the item are stored in this struct.
[out]json_stringJson string filled with meta part of the related item.
Returns

Definition at line 37 of file json.c.

References _add_item_meta_details(), _add_item_meta_payload(), _add_string_field_to_object(), ASSERT_CODE_MESSAGE, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, JSON_OBJECT, json_util_destroy(), json_util_initialize(), json_util_to_string(), MCL_DEBUG, MCL_NULL, MCL_OK, MCL_TRUE, meta_field_names, META_FIELD_TYPE, META_FIELD_VERSION, string_initialize_dynamic(), item_meta_t::type, and item_meta_t::version.

Referenced by _exchange_prepare_data().

Here is the call graph for this function:

Here is the caller graph for this function:

E_MCL_ERROR_CODE json_from_time_series_payload ( time_series_payload_t payload,
string_t **  json_string 
)

Creates payload part of time series in json format.

Parameters
[in]payloadPayload fields of time series is stored in this struct.
[out]json_stringJson string filled with meta part of the related item.
Returns

Definition at line 76 of file json.c.

References _add_time_series_value_sets(), ASSERT_CODE_MESSAGE, ASSERT_STATEMENT_CODE_MESSAGE, DEBUG_ENTRY, DEBUG_LEAVE, JSON_ARRAY, json_util_destroy(), json_util_initialize(), json_util_to_string(), MCL_DEBUG, MCL_NULL, MCL_OK, string_initialize_dynamic(), and time_series_payload_t::value_sets.

Referenced by _exchange_prepare_data().

Here is the call graph for this function:

Here is the caller graph for this function: