A conveience method. JSON-stringify the argument, logs it, and return the string.
@param  {JSON} arg The JSON to be stringified.
@return {string}     the stringified JSON.
 /* istanbul ignore next
544259
function log(arg) {
  var str = JSON.stringify(arg)
  console.log(str)
  return str;
}
442128
static public String getString(String msg, char arg)
	{
		return getString(msg, new Object[] { String.valueOf(arg) });
	}
608332
function convertAbcToJson(input) {
  var outputData = {};
  var parser = new Parser();
  parser.parse(input);
  var tune = parser.getTune();
  outputData = createJsonFromLines(tune);
  outputData.id = getJsonId(input);

  return JSON.stringify(outputData);
}
49315
function mainFunction (arg) {
  if (typeof arg == 'string') {
    return JS2.Parser.parse(arg).toString();
  } else if (arg instanceof Array) {
    return new JS2.Array(arg);
  } else {
    return new JS2.Array();
  }
}
471847
function ( arg ) {
		var result;

		if ( !arg ) {
			return;
		}

		arg = string.trim( arg );

		if ( arg.indexOf( "," ) === -1 ) {
			result = utility.dom( arg );
		}
		else {
			result = [];

			array.each( string.explode( arg ), function ( query ) {
				var obj = utility.dom( query );

				if ( obj instanceof Array ) {
					result = result.concat( obj );
				}
				else if ( obj ) {
					result.push( obj );
				}
			});
		}

		return result;
	}
785682
function (args) {
      var $this = this;
      var dataImport = args[1];
      var ret = [];
      $.each(dataImport, function (index, data) {
        $.each(data.periods, function (index, period) {
          var parent = $('.jqs-day', $this.element).eq(data.day);
          var options = {};
          var height, position;
          if ($.isArray(period)) {
            position = $this.positionFormat(period[0]);
            height = $this.positionFormat(period[1]);
          } else {
            position = $this.positionFormat(period.start);
            height = $this.positionFormat(period.end);
            options = period;
          }

          if (height === 0) {
            height = $this.periodHeight;
          }

          var status = true;
          if (!$this.add(parent, position, height - position, options)) {
            status = false;
          }

          ret.push({
            day: data.day,
            period: [
              $this.periodFormat(position),
              $this.periodFormat(height)
            ],
            status: status
          });
        });
      });

      return JSON.stringify(ret);
    }
1164560
function jsonStringifyWithFunctions (value) {
  function replacer (key, value) {
    if (typeof value === 'function') {
      // Stringify this function, and slightly minify it.
      value = String(value).replace(/\s+/g, ' ');
    }
    return options.jsonStringifyReplacer(key, value);
  }
  return JSON.stringify(value, replacer, options.jsonStringifySpaces);
}
295299
function stringifyVal(val) {
  return JSON.stringify(
    val,
    (key, val) => {
      if (typeof val === 'function') {
        if (val.name) {
          return `[Function: ${val.name}]: ${val.toString()}`
        } else {
          return `[Function]: ${val.toString()}`
        }
      }
      return val
    },
    2
  )
}
707793
function convertArgumentsToFromJSONG(args, remoteMessage, boundPath) {
    var newArgs = [];
    for (var i = 0, len = args.length; i < len; i++) {
        var argI = args[i];
        var paths;
        if (isJSONG(argI)) {
            paths = argI.paths;
        } else if (isPathOrPathValue(argI)) {
            paths = [argI.path || argI];
        } else {
            paths = collapse(argI);
        }
        newArgs[newArgs.length] = {
            jsong: remoteMessage.jsong,
            paths: paths,
            boundPath: boundPath && boundPath.length && boundPath || undefined
        };
    }
    

    return newArgs;
}
64365
function ( arg ) {
		if ( arg === undefined ) {
			arg = this || utility.$;
		}

		arg = arg.toString().match( regex.reflect )[1];

		return string.explode( arg );
	}
267340
protected JsonObject argumentsToJson() {
    JsonObject result = new JsonObject();
    for (Argument a : _arguments) {
      if (a.specified())
        result.addProperty(a._name,a.originalValue());
    }
    return result;
  }
1177407
function stringify(data, action) {
  try {
    return JSON.stringify(data);
  }
  catch (ex) {
    console.error('Performing "' + action + '". Failed to stringify', data);
    util.errorHandler(ex);

    data = {
      code: -1,
      data: ex.toString()
    };
    return JSON.stringify(data);
  }
}
283756
function JSONMinifier() {
  const self = this;
  self.process = ({ output }) => JSON.stringify(JSON.parse(output));
}
755877
function ( arg, qstring ) {
		var obj    = {},
		    result = qstring !== undefined ? ( qstring.indexOf( "?" ) > -1 ? qstring.replace( /.*\?/, "" ) : null) : ( server || string.isEmpty( location.search ) ? null : location.search.replace( "?", "" ) );

		if ( result !== null && !string.isEmpty( result ) ) {
			result = result.split( "&" );
			array.each( result, function (prop ) {
				var item = prop.split( "=" );

				if ( string.isEmpty( item[0] ) ) {
					return;
				}

				if ( item[1] === undefined ) {
					item[1] = "";
				}
				else {
					item[1] = utility.coerce( decodeURIComponent( item[1] ) );
				}

				if ( obj[item[0]] === undefined ) {
					obj[item[0]] = item[1];
				}
				else if ( !(obj[item[0]] instanceof Array) ) {
					obj[item[0]] = [obj[item[0]]];
					obj[item[0]].push( item[1] );
				}
				else {
					obj[item[0]].push( item[1] );
				}
			});
		}

		if ( arg !== null && arg !== undefined ) {
			obj = obj[arg];
		}

		return obj;
	}
423856
function ( obj, arg ) {
		if ( arg === undefined ) {
			return obj.innerHTML;
		}
		else {
			 obj.innerHTML = arg;
			 return obj;
		}
	}
444240
function isValidJSON(arg) {
    var parsed;
    if (!lodash.isString(arg)) {
      return false;
    }
    try {
      parsed = JSON.parse(arg);
    } catch (e) {
      return false;
    }
    if (typeof(parsed) === 'object') {
      return true;
    }
    return false;
  }
779697
private void printSuggestion( String arg, List<ConfigOption> co ) {
        List<ConfigOption> sortedList = new ArrayList<ConfigOption>( co );
        Collections.sort( sortedList, new ConfigOptionLevenshteinDistance( arg ) );
        System.err.println( "Parse error for argument \"" + arg + "\", did you mean " + sortedList.get( 0 ).getCommandLineOption()
                .showFlagInfo() + "? Ignoring for now." );

    }