src/SnooPHP/Http/Response.php
public static function json($content, $code = 200)
	{
		// If collection get array
		if (is_a($content, "SnooPHP\Model\Collection")) $content = $content->array();

		// Return json content
		return new static(
			to_json($content),
			$code,
			["Content-Type" => "application/json; charset=utf-8"]
		);
	}
public static function json($content, $code = 200)
	{
		// If collection get array
		if (is_a($content, "SnooPHP\Model\Collection")) $content = $content->array();

		// Return json content
		return new static(
			to_json($content),
			$code,
			["Content-Type" => "application/json; charset=utf-8"]
		);
	}
Return json content

@param string|mixed	$content	data to be converted to json
@param int			$code		http status code (default: 200)

@return Response