nyx-cmd/nyx_cmd_output_json.cpp
void NyxCmdOutputJson::printOutput(ostringstream &output,
                                   const std::string &query_name,
                                   std::string query_value)
{
	if (printOutputEnabled)
	{
		ReplaceStringInPlace(query_value, "\n", "\\n");
		ReplaceStringInPlace(query_value, "\"", "\\\"");
		output << "    \"" << query_name << "\": \"" << query_value
		       << "\"," << endl;
	}
}
/*
* printOutput print string to output stream
*
*/
printOutput print string to output stream
printOutput print string to output stream
void NyxCmdOutputJson::printOutput(ostringstream &output,
                                   const std::string &query_name,
                                   std::string query_value)
{
	if (printOutputEnabled)
	{
		ReplaceStringInPlace(query_value, "\n", "\\n");
		ReplaceStringInPlace(query_value, "\"", "\\\"");
		output << "    \"" << query_name << "\": \"" << query_value
		       << "\"," << endl;
	}
}
void NyxCmdOutputJson :: printOutput ( ostringstream & output , const std :: string & query_name , std :: string query_value ) { if ( printOutputEnabled ) { ReplaceStringInPlace ( query_value , " \n " , " \\ " ) ; ReplaceStringInPlace ( query_value , " \" " , " \\ \" " ) ; output << " \" " << query_name << " \" \" " << query_value << " \" " << endl ; } }
printOutput print string to output stream
printOutput print string to output stream