MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / tokenListFromJson

Function tokenListFromJson

CesiumIonClient/src/Connection.cpp:738–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738TokenList tokenListFromJson(const rapidjson::Value& json) {
739 TokenList result;
740
741 const auto itemsIt = json.FindMember("items");
742 if (itemsIt != json.MemberEnd() && itemsIt->value.IsArray()) {
743 const rapidjson::Value& items = itemsIt->value;
744
745 for (auto it = items.Begin(); it != items.End(); ++it) {
746 std::optional<Token> token = tokenFromJson(*it);
747 if (!token) {
748 continue;
749 }
750
751 result.items.emplace_back(std::move(token.value()));
752 }
753 }
754
755 return result;
756}
757
758} // namespace
759

Callers 1

tokensMethod · 0.85

Calls 1

tokenFromJsonFunction · 0.85

Tested by

no test coverage detected