library/src/javascript/JSON/BP-JSON.cc
// lookup a json table entry by path query
lookup a json table entry by path query
lookup a json table entry by path query
P_BP_HASH_TABLE_KEYED_ENTRY BP_JSONLookupEntryByPath(P_BP_JSON json, char **path)
{
	if(!json)
		return NULL;
	if(!json->json_out_hreg)
		return NULL;
	if(!path)
		return NULL;
	P_BP_HASH_TABLE_KEYED_ENTRY looked_up_entry = BP_HashRegLookupTableEntryByPath
	(
		json->json_out_hreg,
		path
	);
	if(!looked_up_entry)
	{
		looked_up_entry = BP_HashRegLookupTableByPath
		(
			json->json_out_hreg,
			path
		);
	}
	return looked_up_entry;
}
P_BP_HASH_TABLE_KEYED_ENTRY BP_JSONLookupEntryByPath ( P_BP_JSON json , char * * path ) { if ( ! json ) return NULL ; if ( ! json -> json_out_hreg ) return NULL ; if ( ! path ) return NULL ; P_BP_HASH_TABLE_KEYED_ENTRY looked_up_entry = BP_HashRegLookupTableEntryByPath ( json -> json_out_hreg , path ) ; if ( ! looked_up_entry ) { looked_up_entry = BP_HashRegLookupTableByPath ( json -> json_out_hreg , path ) ; } return looked_up_entry ; }
lookup a json table entry by path query
lookup a json table entry by path query
// run basic null checks // attempt to look up an entry // if the entry failed, the entry might be a table, attempt to resolve it as one // resolve by table now // return the looked up entry (or null if lookup fails)