| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_AUTHZ_REDFISH_PRIVILEGES_JSON_H_ |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_AUTHZ_REDFISH_PRIVILEGES_JSON_H_ |
| |
| #include <nlohmann/json.hpp> |
| #include "redfish_privileges.h" |
| |
| namespace milotic::authz { |
| |
| // Serializes a RedfishPrivileges to the DMTF operation-privilege JSON object, |
| // i.e. {"Privilege": [<privileges>]}. |
| // |
| // This lives outside RedfishPrivileges so that redfish_privileges.h stays free |
| // of any nlohmann dependency, letting consumers use RedfishPrivileges without |
| // pulling in nlohmann. |
| nlohmann::json::object_t RedfishPrivilegesToJson( |
| const RedfishPrivileges& privileges); |
| |
| } // namespace milotic::authz |
| |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_AUTHZ_REDFISH_PRIVILEGES_JSON_H_ |