@cond Doxygen_Suppress
| 142 | |
| 143 | //! @cond Doxygen_Suppress |
| 144 | void Meridian::_exportToJSON( |
| 145 | io::JSONFormatter *formatter) const // throw(FormattingException) |
| 146 | { |
| 147 | auto writer = formatter->writer(); |
| 148 | auto objectContext( |
| 149 | formatter->MakeObjectContext("Meridian", !identifiers().empty())); |
| 150 | |
| 151 | const auto &l_long = longitude(); |
| 152 | writer->AddObjKey("longitude"); |
| 153 | const auto &unit = l_long.unit(); |
| 154 | if (unit == common::UnitOfMeasure::DEGREE) { |
| 155 | writer->Add(l_long.value(), 15); |
| 156 | } else { |
| 157 | auto longitudeContext(formatter->MakeObjectContext(nullptr, false)); |
| 158 | writer->AddObjKey("value"); |
| 159 | writer->Add(l_long.value(), 15); |
| 160 | writer->AddObjKey("unit"); |
| 161 | unit._exportToJSON(formatter); |
| 162 | } |
| 163 | if (formatter->outputId()) { |
| 164 | formatID(formatter); |
| 165 | } |
| 166 | } |
| 167 | //! @endcond |
| 168 | |
| 169 | // --------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected