I did JSON parsing on Eclipse ADT and it was running perfectly. But when used the same code on Android Studio it was showing error in DefaultHttpClient and every other word in t
I strongly recommend you to use a library to to this job. You could use GSON lib (developed by google) or Jackson lib. For the requests you could use Retrofit lib (developed by Square).
add Gson dependency in build.gradle
compile 'com.google.code.gson:gson:2.4'
then create POJO class for json response.
for that just copy your json response string into below link.
json to pojo converter
give your class name and package name in righ side form and download that file.
now come back in our app code.
Demo demo = new Gson().fromJson("JSON STRING",Demo.class);
Demo is our POJO class which we have created from json to pojo converter