lib/handlers.js
function renderJSON( request, reply, err, result ){
	if(err){
		if(err.code === 404){
			reply(new hapi.error.notFound(err.message));
		}else{
			reply(new hapi.error.badRequest(err.message));
		}
	}else{
		reply(result).type('application/json; charset=utf-8');
	}
}
function renderJSON( request, reply, err, result ){
	if(err){
		if(err.code === 404){
			reply(new hapi.error.notFound(err.message));
		}else{
			reply(new hapi.error.badRequest(err.message));
		}
	}else{
		reply(result).type('application/json; charset=utf-8');
	}
}
function renderJSON ( request , reply , err , result ) { if ( err ) { if ( err . code === 404 ) { reply ( new hapi . error . notFound ( err . message ) ) ; } else { reply ( new hapi . error . badRequest ( err . message ) ) ; } } else { reply ( result ) . type ( 'application/json; charset=utf-8' ) ; } }
render json out to http stream
render json out to http stream