Zigbee Protocol Controller 1.6.0
json_helpers.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
20#ifndef JSON_HELPERS_HPP
21#define JSON_HELPERS_HPP
22
23#include "zap-types.h"
24
25#include <nlohmann/json.hpp>
26
34[[maybe_unused]] bool get_bool_from_json(nlohmann::json &jsn,
35 const std::string &key);
36
45[[maybe_unused]] bool get_bool_from_json_array(nlohmann::json &jsn,
46 size_t index);
47
57[[maybe_unused]] nlohmann::json
59 const uint8_t arr_size);
60
70[[maybe_unused]] nlohmann::json
72 const uint8_t arr_size);
73
74#endif //JSON_HELPERS_HPP
bool get_bool_from_json(nlohmann::json &jsn, const std::string &key)
Converts json payload (either boolean, string or integer) to bool value. This function is used becaus...
nlohmann::json add_transitions_to_json_obj(const TransitionType *data_array, const uint8_t arr_size)
The pointer to array of "TransitionType" structs couldn't be automatically converted to nlohmann::jso...
bool get_bool_from_json_array(nlohmann::json &jsn, size_t index)
Converts json array element (either boolean, string or integer) to bool value.
nlohmann::json add_extension_field_to_json_obj(const SExtensionFieldSetList *data_array, const uint8_t arr_size)
The pointer to array of "SExtensionFieldSetList" structs couldn't be automatically converted to nlohm...
Definition: zap-types.h:2264
Definition: zap-types.h:2287