add JSON responses to book and text actions