MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / key

Method key

Source/Utils/json.hpp:5588–5603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5586 }
5587
5588 bool key(string_t& val)
5589 {
5590 BasicJsonType k = BasicJsonType(val);
5591
5592 // check callback for key
5593 const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);
5594 key_keep_stack.push_back(keep);
5595
5596 // add discarded value at given key and store the reference for later
5597 if (keep && ref_stack.back())
5598 {
5599 object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded);
5600 }
5601
5602 return true;
5603 }
5604
5605 bool end_object()
5606 {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
push_backMethod · 0.45
operator[]Method · 0.45

Tested by

no test coverage detected