public static function json($obj = NULL, $obclean = COBRA_REQUEST_JSON_OBCLEAN) { if ($obclean) { __k_ob_clean(); } echo json_encode($obj); }
function __k_json($str = '', $type = 'exception', $obclean = COBRA_KERNEL_JSON_OBCLEAN) { if ($obclean) { __k_ob_clean(); } echo json_encode(array('type' => $type, 'data' => $str)); }