• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to code a basic json/rest protocol on android?

Yathushan

Well-Known Member
Hey all,

I was wondering whether anyone could direct me in the right direction to carry out a rest protocol using Gson?

I have attempted it using a code snippet from:

Android JSON Parsing with Gson Tutorial - Java Code Geeks.

I tried to to alter the data in both search response & results. I tried to change the @SerializedName in the result class to name, id, status as shown in the response section of the test API documentation. I then tried to make similar changes in the search response section to method & format as shown in the parameter to call the API. However, nothing happens when i try to run it. The program just f/c's. I am not sure what to substitute in for the @SerializedName in the response class as well.
I used the following site to try it out:

API Documentation - Tube Updates - The API for London Underground / TFL Data

I have tried both with no avail. Could someone help me please?
 
Back
Top Bottom