The Json Path error: com.jayway.jsonpath.PathNotFoundException: Same codes, same jars. but just I see this problem on my pc

Viewed 16

I have same codes, same jars but only i have this problem. I hope someone can help me.My friend can execute same codes on their pcs but I can't.. I don't know, why ? They imported my file to them pcs and they can execute succesfuly but I can't on my pc. I see the error of com.jayway.jsonpath.PathNotFoundException: Expected to find an object with property ['result'] in path $ but found 'java.lang.String'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'. Do you know a way for solution ?

My code below

Response response=given()
                        .header("Authorization", "Bearer "+getToken())
                        .body(requestData)
                        .contentType(ContentType.JSON)
                    .when()
                        .post(createExpenseURL);
    response.prettyPrint();
    return response;

My console is: HTTP Error 400. The request is badly formed.

0 Answers
Related