MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / CreateSchemaRecursive

Method CreateSchemaRecursive

rapidjson/schema.h:1429–1444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1427 };
1428
1429 void CreateSchemaRecursive(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {
1430 if (schema)
1431 *schema = SchemaType::GetTypeless();
1432
1433 if (v.GetType() == kObjectType) {
1434 const SchemaType* s = GetSchema(pointer);
1435 if (!s)
1436 CreateSchema(schema, pointer, v, document);
1437
1438 for (typename ValueType::ConstMemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr)
1439 CreateSchemaRecursive(0, pointer.Append(itr->name, allocator_), itr->value, document);
1440 }
1441 else if (v.GetType() == kArrayType)
1442 for (SizeType i = 0; i < v.Size(); i++)
1443 CreateSchemaRecursive(0, pointer.Append(i, allocator_), v[i], document);
1444 }
1445
1446 void CreateSchema(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document) {
1447 RAPIDJSON_ASSERT(pointer.IsValid());

Callers

nothing calls this directly

Calls 5

MemberBeginMethod · 0.80
MemberEndMethod · 0.80
GetTypeMethod · 0.45
AppendMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected