library/src/javascript/JSON/BP-JSON.cc
// Add table by path query.
Add table by path query.
Add table by path query .
BP_ERROR_T BP_JSONRemoveTableByPathQuery
(
		P_BP_JSON json,
		char    * lookup_query
)
{
	if(!BP_StringIsReasonablePrintableString(lookup_query, bpstrlen(lookup_query), BP_FALSE, BP_FALSE))
		return ERR_FAILURE;
	char ** path_lookup_array = BP_HashRegStringLookupToPathArray(lookup_query, bpstrlen(lookup_query));
	if(!path_lookup_array)
		return ERR_FAILURE;
	BP_ERROR_T remove_status = BP_JSONRemoveTableByPath
	(
			json,
			path_lookup_array
	);
	BP_DestroyPointerArrayNullTerminated((void **) path_lookup_array);
	bpfree(path_lookup_array);
	return remove_status;
}
BP_ERROR_T BP_JSONRemoveTableByPathQuery ( P_BP_JSON json , char * lookup_query ) { if ( ! BP_StringIsReasonablePrintableString ( lookup_query , bpstrlen ( lookup_query ) , BP_FALSE , BP_FALSE ) ) return ERR_FAILURE ; char * * path_lookup_array = BP_HashRegStringLookupToPathArray ( lookup_query , bpstrlen ( lookup_query ) ) ; if ( ! path_lookup_array ) return ERR_FAILURE ; BP_ERROR_T remove_status = BP_JSONRemoveTableByPath ( json , path_lookup_array ) ; BP_DestroyPointerArrayNullTerminated ( ( void * * ) path_lookup_array ) ; bpfree ( path_lookup_array ) ; return remove_status ; }
Add table by path query.
Add table by path query .
// ensure lookup query is reasonable/printable string // create path array from lookup query // check to ensure we've created a lookup array // attempt to remove the table by path // destroy lookup array // return the status