Lines Matching full:json
4 #include "json-config.hpp"
7 #include <nlohmann/json.hpp>
18 using Json = nlohmann::json; typedef
25 /** @brief Parse LED JSON file and output Json object
27 * @param[in] path - path of LED JSON file
29 * @return const Json - Json object
31 Json readJson(const fs::path& path) in readJson()
43 return Json::parse(jsonFile); in readJson()
79 static void loadJsonConfigV1GroupMember(const Json& member, in loadJsonConfigV1GroupMember()
100 static void loadJsonConfigV1Group(const Json& entry, in loadJsonConfigV1Group()
103 const Json empty{}; in loadJsonConfigV1Group()
132 /** @brief Load JSON config and return led map (JSON version 1)
136 phosphor::led::GroupMap loadJsonConfigV1(const Json& json) in loadJsonConfigV1() argument
140 // define the default JSON as empty in loadJsonConfigV1()
141 const Json empty{}; in loadJsonConfigV1()
142 auto leds = json.value("leds", empty); in loadJsonConfigV1()
152 /** @brief Load JSON config and return led map
158 auto json = readJson(path); in loadJsonConfig() local
160 auto version = json.value("version", 1); in loadJsonConfig()
164 return loadJsonConfigV1(json); in loadJsonConfig()
167 lg2::error("Unsupported JSON Version: {VERSION}", "VERSION", in loadJsonConfig()
175 /** @brief Get led map from LED groups JSON config
177 * @param[in] config - Path to the JSON config.