Hi REST API program below is not proceeding further

http://toolsqa.com/rest-assured/post-request-using-rest-assured/

On this Page, the JSONObject creation seems to be problematic. Could you please share the updated code.

JSONObject requestParams = new JSONObject();

getting below error:

java.lang.Error: Unresolved compilation problems:
JSONObject cannot be resolved to a type
JSONObject cannot be resolved to a type

at RestAPIDemoQA.POSTMethod.RegistrationSuccessful(POSTMethod.java:19)

 

Hi All,

Got solution for this issue.

Need to add json-simple jar to Build path as External jar file. Below is the path where this jar is available.

http://www.java2s.com/Code/Jar/j/Downloadjsonsimple11jar.htm

Added this jar & when I ran same program working fine.

 

Thanks,

Yagna Vardhan T

on April 5, 2018.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.