library/src/javascript/JSON/BP-JSON.cc
// access an entry as a string (do not free result)
access an entry as a string (do not free result)
access an entry as a string ( do not free result )
char * BP_JSONAccessEntryAsReasonableString(P_BP_HASH_TABLE_KEYED_ENTRY entry, BP_BOOL allow_newlines, BP_BOOL allow_carriage_returns)
{
	if(!entry)
		return NULL;
	if(!entry->data)
		return NULL;
	if(!entry->data_size)
		return NULL;
	if(!BP_StringIsReasonablePrintableString( (char *) entry->data, entry->data_size-1, allow_newlines, allow_carriage_returns))
	{
		return NULL;
	}
	return (char *) entry->data;
}
char * BP_JSONAccessEntryAsReasonableString ( P_BP_HASH_TABLE_KEYED_ENTRY entry , BP_BOOL allow_newlines , BP_BOOL allow_carriage_returns ) { if ( ! entry ) return NULL ; if ( ! entry -> data ) return NULL ; if ( ! entry -> data_size ) return NULL ; if ( ! BP_StringIsReasonablePrintableString ( ( char * ) entry -> data , entry -> data_size - 1 , allow_newlines , allow_carriage_returns ) ) { return NULL ; } return ( char * ) entry -> data ; }
access an entry as a string (do not free result)
access an entry as a string ( do not free result )
// ensure we have an entry // string must be reasonable // return the data pointer