json endpoint for result

Convert results to json and correct errors in type
Added proper result test, only verifies StatusCode