Kotlin Youtube - How to Quickly Fetch Parse JSON with OkHttp and Gson (Ep 2)

Kotlin Youtube - How to Quickly Fetch Parse JSON with OkHttp and Gson (Ep 2)

Lets Build That App

6 лет назад

85,866 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Ro Díaz
Ro Díaz - 26.06.2022 09:20

Thank you. I had like 3 hours trying to parse a JSON from an API and thanks to you I was able to do it. Not only that, but I think I actually understand the process and will be able to repeat it in the near future. Gracias.

Ответить
Donat Hmm
Donat Hmm - 23.11.2021 22:21

Thank you bro

Ответить
Trường Nguyễn thế
Trường Nguyễn thế - 06.09.2021 06:53

love your work your video , thanks alot

Ответить
aman sagar
aman sagar - 03.08.2021 20:50

in javascript we do fetch.then().catch() and we are done, why it is so complicated in android? is it just me? and the big question why nobody wonderers why it is complicated in android? or it may be because im not familier with OOPs

Ответить
Smag
Smag - 15.07.2021 15:18

Amazing tutorial. Watched countless other tutorials and none of them told me to add the internet permission in the manifest, hence my errors. You made this very clear and simple to understand. Thank you!

Ответить
Cotswold Conversions
Cotswold Conversions - 06.07.2021 23:27

3 years later, still a life saver. Clear and concise, also great demo of 'Debug' too 👍

Ответить
Ethan Hatch
Ethan Hatch - 30.06.2021 21:42

My debugger is telling me that I am getting NULL values in my class when converting Json to Gson in: val homeFeed = gson.fromJson(body, HomeFeed::class.java) I can't seem to figure out why or how I can mitigate this. (I am using my own variable names and a different API)

Ответить
Mahir Chowdhury
Mahir Chowdhury - 17.06.2021 12:00

I love you

Ответить
Russell Harrower
Russell Harrower - 22.05.2021 09:52

note is is now : println(response.body!!.string())

Ответить
Roii Roii
Roii Roii - 16.05.2021 07:17

I applied for a job 1 week ago and this was my sort of task to get an interview. Basically if i am going to be accepted on this internship it's going to be just because of you
Thank you

Ответить
kanhaiya tulsyan
kanhaiya tulsyan - 12.05.2021 12:28

response?.body()?.string is not working for me.....idk y...🥺🥺

Ответить
Abdulazeez
Abdulazeez - 09.05.2021 01:37

Thank you !!! , you just saved me in my 400 level class

Ответить
Francisco Neto
Francisco Neto - 13.03.2021 15:41

Hi, can i contact you? I'm new até kotlin and Android studio, só i'm here to ask if you please, could help me!

Ответить
souphiane
souphiane - 17.01.2021 18:32

This video helpt me A LOT! I have a deadline and don't have the luxury to dive into the documentation. Thanks for explaining this so easily!

Ответить
DRUMAGAZINE
DRUMAGAZINE - 05.01.2021 09:57

Why don't you use retrofit to parse the data

Ответить
fauzan buhardeen
fauzan buhardeen - 23.11.2020 05:33

Hi, nice tutorial, how do i change the url ?

Ответить
Christophe Beaulieu
Christophe Beaulieu - 17.09.2020 04:13

The videos are great, but I feel like your microphone might be slightly not loud enough? I'm comparison to other videos, this one is probably at 70-90% volume whereas I listen to others at like 40-50%.

Anyways, the content and the videos are amazing! :)

Ответить
Matheus Serrão Uchoa
Matheus Serrão Uchoa - 09.09.2020 02:54

owesome video is symple and just go in what we need thankssss a lot
ps:from a brasilian fan

Ответить
Aditya Verma
Aditya Verma - 10.07.2020 15:36

very good !! can you please tell me how to parse json array instead of json object ???

Ответить
shilpi kumari
shilpi kumari - 01.07.2020 14:20

suru se android listview and last tk android practice doing

Ответить
Heath Kornblum
Heath Kornblum - 10.06.2020 20:07

Brian has a casual, easy demeanor that makes him a good instructor. I recommend this video.

Ответить
ECO Display
ECO Display - 07.06.2020 08:37

Hi Sir.. do you have any video for filtering this recyclerview? 10q

Ответить
David
David - 05.06.2020 21:00

In case anyone is having the problem I had - in the build.gradle file, if you write what Brian wrote ("compile..."), it'll show up with a line crossed through it. If you hover your mouse over that text, it'll tell you that "compile is deprecated, replace with implementation" - so you basically just replace the keyword.
I would've figured this out sooner if I'd known to hover over that text, haha!
Awesome videos, Mr. Voon! 10/10! Thank you!

Ответить
Everton Rodrigues
Everton Rodrigues - 21.05.2020 05:52

For everyone having trouble with Gson not parsing array, if your Json starts with a "[", make sure to use <Array>YourClass. Also, if it starts as an array, the example that he have using the HomeFeed class won't work, you would need to use the Video class directly. Watch out for the format of your Json.

Ответить
Vanilla's Recaps
Vanilla's Recaps - 19.05.2020 02:12

Hey I tried changing my url to my localhost one and it suddenly don't work , can anyone help me?

Ответить
Nandita Ekambaram
Nandita Ekambaram - 24.03.2020 14:19

My code moves to the onFailure function call and gives me an error "System.out: socket failed: EPERM (Operation not permitted)"

Ответить
Toha Assegaf
Toha Assegaf - 29.01.2020 10:06

sorry for asking, why my api always Failed to execute request, i'll try to use your api anda another api. but it still not working properly

Ответить
Kanakapalli anurag
Kanakapalli anurag - 28.01.2020 12:09

runOnUiTherad is not working
can u please me out

Ответить
Shridutt Kothari
Shridutt Kothari - 20.12.2019 18:01

Voice is too low, please can you speak more loudly

Ответить
Professor Allen Mallari
Professor Allen Mallari - 13.12.2019 21:26

First of all, i got through all EPISODE 1 without any problem. Now On EP 2 I got suck with System.Out to display the vakye as the OnResponse(call: Call?, response: Response? ) is not working especaily the val body. response?.body()?.string() wich is string is toString() on mine .. it showing NULL value when it comes to the body... what am i doing wrong? please help!

Ответить
Thanasis Athanasi
Thanasis Athanasi - 13.12.2019 14:48

What is different of Gson and Volley?

Ответить
HispaGamers
HispaGamers - 10.12.2019 04:59

thanks profesor brian

Ответить
William Clarkson
William Clarkson - 03.12.2019 16:33

I'm getting an error when using fetchJson, "E/zygote: isWhitelistProcess - Process is Whitelisted. Does anyone know how to get around this? I'm using my Samsung S7 as my emulator, its never given me this error before. Any help appreciated!!!

Ответить
Joe Shamuraq
Joe Shamuraq - 10.11.2019 04:26

Is there gonna be tutorial for populating recyclerview from, say, an xml file within the product package instead of loading it from the internet?

Ответить
Christina Chee
Christina Chee - 19.08.2019 20:23

Thanks your video are awesome.

Ответить
Abscon Ditus
Abscon Ditus - 19.07.2019 14:34

You're so chill. I feel like I could smoke a blunt with you and talk about various code syntaxes.

Ответить
Prakash Maharjan
Prakash Maharjan - 10.07.2019 12:40

please make some video to do same with Retrofit..
Thank you..

Ответить
Tom
Tom - 12.06.2019 23:48

Hello ! I am having a big problem. When I compile, the function prints out what is written when onFailure but not when onResponse. how to fix it? I tried other .json files but still the same

Ответить