updated response to give json object.

changed tests for this as well