json response generation