Emit send and end events for json response too