Context#JSON() new line The Context#JSON() is adding a newline character to the end of the JSON response. expected: "{\"name\":\"Jon Snow\",\"email\":\"[email protected]\"}" actual: "{\"name\":\"Jon Snow\",\"email\":\"[email protected]\"}\n"