| 105 | } |
| 106 | |
| 107 | Json::Value OSOutput::toJSON() const { |
| 108 | Json::Value root; |
| 109 | root["name"] = m_name; |
| 110 | root["display_name"] = m_displayName; |
| 111 | root["m_shortName"] = m_shortName; |
| 112 | if (m_description) { |
| 113 | root["description"] = *m_description; |
| 114 | } |
| 115 | root["type"] = m_type.valueName(); |
| 116 | if (m_units) { |
| 117 | root["units"] = *m_units; |
| 118 | } |
| 119 | root["model_dependent"] = m_modelDependent; |
| 120 | |
| 121 | return root; |
| 122 | } |
| 123 | |
| 124 | std::string OSOutput::toJSONString() const { |
| 125 | return toJSON().toStyledString(); |