outputing a json string and exit (like die() in php)
PHP situation: When a given endpoint of my API is reached, a json string is outputed for being consumed. I sent the proper headers, echo the string and exit the script using die(). I could do it more brutally just by doing die($json_string);
I expect questions such as: why you wanna do that? why don't you do it in php? answer: for the sake of experimenting and learning.