JSON parsing using GSON with Android

preview_player
Показать описание
Hi Subscribers and watchers,

Underneath the description i have attached all the necessary information to start working on.

In this webservices tutorial we are going to learn how to parse json api using gson library and for the efficiency and speedy way to parse the json i have used asynchttp network library and picasso image library in the tutorial i have explained it deeply.

Step 1: Create an android project with title as your choice and internet permission to the manifest.

Step 2: Using gradle please web tool get gradle dependencies for the libraries such as gson asynchttp (loopj) and picasso.

Step 3: Create listview in the main activity xml and do create each list item layout as shown in the video.

Step 4: Using 'GsonFormat' Android studio plugin generate the getters and setters for the json response.

Step 5: Write custom adapter with the list of items as param in its constructor as showed in the video do inflate the each list item layout in the adapter, Using picasso library inside adapter you can load the image.

Step 6: Instantiate all the classes and using asynchttp get method call you can call the json api as shown.

// RottenTomatoe movie list api

// Dependency finder

// JSON Formatter

// Java Helpers

// Understanding REST API

// You can find me from

Thank you for subscribing our channel :)
Рекомендации по теме
Комментарии
Автор

man what a video, good english and more slow then "normal english" this is amazing for non expert in english understand the tutorial, thank you so much!!!

didioliverf
Автор

great example and explanation, very well done, thanks man

lhadev
Автор

Really nice video buddy, you saved me!

Thanks so much!

keep recording!

u got a subscriber!

eiglimarjunior
Автор

Great job. Do you explain Picasso to those who don't know that power that it has for loading images from urls and caching them ?

dankardell
Автор

Awesome.Thanks a lot!
You saved my day.

ashitshrivastava
Автор

Hi, how can I storage data in SQLite that comes from Gson for my app

thanks

yurialonzo
Автор

how to apply endless scrolling pagination on this? do you have any tutorial about it?

steamraid
Автор

Hey man, your tutorial is so good and i have done everything like u, but my project wont run. When i try to test the project it runs and then automatically i get message "Project stopped working". Please tell me if u know what is it. Btw in my JSON file is only text, there is no links or images. Thanks a lot

mersad
Автор

hey can u do this video using JsonArray parsing with gson library or any guess how to do it ??? like [{"name":"name1", "url":"url1"}, {"name":"name2", "url":"url2"}, ...]

shozab
Автор

Hi sir, I must say really nice.
can you tell me how you opened that dialogue box for converting JSON data into Java object.

soniakshay
Автор

Hi,
Excellent Video!
I have one question about the AsyncHttpClient and one problem.
The problem:
in minute 24:17 of the video you initialize the AsyncHttpClient and then the Header[] parameter has an over line on it.
When i am trying to do the same it gives me an error "Cannot resolve symbol 'Header'". Do you know how to solve it?

The Question:
Is there a way of doing the same thing but with an AsyncTask?

YafimAsh
Автор

We saw the code have " private String album_base64;private String album but we don't have~~~ why?? (at 14:30)

Irenethirty
Автор

how do you get the gson format tool? Mine doesn't pop up like yours (I am using a PC)

youngslyyme
Автор

How can i use my json string variable in GSON

ExplainThisBob
Автор

I have a question.
How about if the URL needs API_KEY ? how can pass KEY to AsyncHttpClient ?

hellondioo
Автор

i watch this tutorial and implement and one error is found in main activity where we use gson.tojson () function error is "change field responseObj into type to java.lang.string
how to resolve it

azharrasheed
Автор

Getting Exception in CustomAdapter class. In GetView() method, At Response.MoviesEntity item =

Exception is
java.lang.ClassCastException: java.lang.Integer cannot be cast to

I am using AsyncTask class. Please tell me what should i check to avoid it

Aj-fxbe
Автор

How you get GsonFormat? This step looks very easy but doesnt work by just writing GsonFormat at 14:18?

BR
Автор

How do you open the GsonFormat plugin window?

icefreezer
Автор

hi sir I need an application for a currency convertor wich work with API 23 could you please help me ???

touatisafa