Hisham Muneer | 12 - JSON Parsing, Creating a URLConnection - Android Studio @hishammuneer | Uploaded 8 years ago | Updated October 02 2023
In this tutorial we will design our xml using a button and textview and we will try to parse a very simple (one object json) response. For that we will create an HttpUrlConnection to connect to server and BufferedReader to read the stream we have received.
Url to get a single object Json response - https://jsonparsingdemo-cec5b.firebaseapp.com/jsonData/moviesDemoItem.txt
After that we will run our application and will check if we have parsed the json successfully.
We get a NetworkOnMainThreadException if try to make a network call on main thread, we will also see how we can resolve this exception in Android.
Watch all videos of this series: https://www.youtube.com/playlist?list=PLgjt1h_kabFebUn1anGYZ6_Tfkw64Ww12
Complete Source code link: https://github.com/hishamMuneer/JsonParsingDemo
Quiz
====
What should be used to create a connection?
Correct: HttpURLConnection
In this tutorial we will design our xml using a button and textview and we will try to parse a very simple (one object json) response. For that we will create an HttpUrlConnection to connect to server and BufferedReader to read the stream we have received.
Url to get a single object Json response - https://jsonparsingdemo-cec5b.firebaseapp.com/jsonData/moviesDemoItem.txt
After that we will run our application and will check if we have parsed the json successfully.
We get a NetworkOnMainThreadException if try to make a network call on main thread, we will also see how we can resolve this exception in Android.
Watch all videos of this series: https://www.youtube.com/playlist?list=PLgjt1h_kabFebUn1anGYZ6_Tfkw64Ww12
Complete Source code link: https://github.com/hishamMuneer/JsonParsingDemo
Quiz
====
What should be used to create a connection?
Correct: HttpURLConnection