| 48 | } |
| 49 | |
| 50 | void cmSpdxSerializer::AddVisitable(std::string const& key, |
| 51 | cmSbomObject const& visitable) |
| 52 | { |
| 53 | if (visitable.IsNull()) { |
| 54 | return; |
| 55 | } |
| 56 | |
| 57 | Json::Value parentValue = std::move(CurrentValue); |
| 58 | visitable.Serialize(*this); |
| 59 | Json::Value childValue = std::move(CurrentValue); |
| 60 | |
| 61 | CurrentValue = std::move(parentValue); |
| 62 | CurrentValue[key] = std::move(childValue); |
| 63 | } |
| 64 | |
| 65 | void cmSpdxSerializer::AddVectorIfPresent(std::string const& key, |
| 66 | std::vector<cmSbomObject> const& vec) |