#pragma once #include #include #include namespace openpower::pels::user_data { /** * @brief Returns the UserData contents as a formatted JSON string. * * @param[in] componentID - The comp ID from the UserData section header * @param[in] subType - The subtype from the UserData section header * @param[in] version - The version from the UserData section header * @param[in] data - The section data * * @return std::optional - The JSON string if it could be created, * else std::nullopt. */ std::optional getJSON(uint16_t componentID, uint8_t subType, uint8_t version, const std::vector& data); } // namespace openpower::pels::user_data