MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / Parse

Method Parse

framework/src/bundle/BundleManifest.cpp:170–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 BundleManifest::BundleManifest(AnyMap const& m) : m_Headers(m) {}
169
170 void
171 BundleManifest::Parse(std::istream& is)
172 {
173 rapidjson::IStreamWrapper jsonStream(is);
174 rapidjson::Document root;
175 if (root.ParseStream(jsonStream).HasParseError())
176 {
177 throw std::runtime_error(rapidjson::GetParseError_En(root.GetParseError()));
178 }
179
180 if (!root.IsObject())
181 {
182 throw std::runtime_error("The Json root element must be an object.");
183 }
184
185 ParseJsonObject(root, m_Headers);
186 }
187
188 AnyMap const&
189 BundleManifest::GetHeaders() const

Callers 2

TEST_FFunction · 0.80
BundlePrivateMethod · 0.80

Calls 1

ParseJsonObjectFunction · 0.85

Tested by 1

TEST_FFunction · 0.64