MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / has_shape

Method has_shape

tests/autotester/json11.hpp:971–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969 */
970
971bool Json::has_shape(const shape & types, string & err) const {
972 if (!is_object()) {
973 err = "expected JSON object, got " + dump();
974 return false;
975 }
976
977 for (auto & item : types) {
978 if ((*this)[item.first].type() != item.second) {
979 err = "bad type for " + item.first + " in " + dump();
980 return false;
981 }
982 }
983
984 return true;
985}
986
987} // namespace json11
988

Callers

nothing calls this directly

Calls 2

dumpFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected