MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / valueAsJSON

Method valueAsJSON

src/utilities/data/Attribute.cpp:674–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672 overloaded(Ts...) -> overloaded<Ts...>;
673
674 Json::Value Attribute_Impl::valueAsJSON() const {
675 return std::visit(overloaded{//
676 [](std::monostate) { return Json::Value{Json::nullValue}; },
677 [](const std::vector<Attribute>& arg) {
678 Json::Value subElement(Json::arrayValue);
679 for (const Attribute& attribute : arg) {
680 subElement.append(attribute.toJSON());
681 }
682 return subElement;
683 },
684 [](auto arg) { return Json::Value(arg); }},
685 m_value);
686 }
687#endif
688
689 Json::Value Attribute_Impl::valueAsJSON() const { // NOLINT(misc-no-recursion)

Callers

nothing calls this directly

Calls 2

ValueClass · 0.70
toJSONMethod · 0.45

Tested by

no test coverage detected