MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / makeArray

Method makeArray

base/poco/JSON/src/Array.cpp:232–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230
231
232Poco::Dynamic::Array Array::makeArray(const JSON::Array::Ptr& arr)
233{
234 Poco::Dynamic::Array vec;
235
236 JSON::Array::ConstIterator it = arr->begin();
237 JSON::Array::ConstIterator end = arr->end();
238 int index = 0;
239 for (; it != end; ++it, ++index)
240 {
241 if (arr->isObject(it))
242 {
243 Object::Ptr pObj = arr->getObject(index);
244 DynamicStruct str = Poco::JSON::Object::makeStruct(pObj);
245 vec.insert(vec.end(), str);
246 }
247 else if (arr->isArray(it))
248 {
249 Array::Ptr pArr = arr->getArray(index);
250 std::vector<Poco::Dynamic::Var> v = makeArray(pArr);
251 vec.insert(vec.end(), v);
252 }
253 else
254 vec.insert(vec.end(), *it);
255 }
256
257 return vec;
258}
259
260
261void Array::clear()

Callers 1

jquery.min.jsFile · 0.80

Calls 7

beginMethod · 0.45
endMethod · 0.45
isObjectMethod · 0.45
getObjectMethod · 0.45
insertMethod · 0.45
isArrayMethod · 0.45
getArrayMethod · 0.45

Tested by

no test coverage detected