added functionality to repondertrait and roleresponder class to send json error messages, and convert an argument to json with tests