GDG List URL is 404 again.
Issue from #8 and #5 is happening today again. In fact this morning I was able to access (https://developers.google.com/community/gdg/groups/directory.json) and in the afternoon, the linkd https://developers.google.com/community/gdg/groups has been re-directed to https://gdg.community.dev/
Please provide a valid json URL.
Maybe someone can just post the contents of this file as an example so I can uppload it to my own server
I Join. Please provide a valid json URL.
Recommended
Given the fact that the url changes too frequently, I have uploaded it on Github and the link is https://andre-max.github.io/gdg-json/each_chapter.json for each chapter and for the chapter region, the link is https://andre-max.github.io/gdg-json/chapter_region.json
Alternative
However, the actual developer page that is hosting the json is https://gdg.community.dev/api/chapter_region?chapters=true for each chapter and for the chapter region, the link is https://gdg.community.dev/api/chapter_region but that may change in the future.
Recommended
Given the fact that the url changes too frequently, I have uploaded it on Github and the link is https://andre-max.github.io/gdg-json/each_chapter.json for each chapter and for the chapter region, the link is https://andre-max.github.io/gdg-json/chapter_region.json
Alternative
However, the actual developer page that is hosting the json is https://gdg.community.dev/api/chapter_region?chapters=true for each chapter and for the chapter region, the link is https://gdg.community.dev/api/chapter_region but that may change in the future.
Trying with any of those links just brings up this: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.gdgfinder, PID: 3157 com.squareup.moshi.JsonDataException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $ at com.squareup.moshi.JsonUtf8Reader.beginObject(JsonUtf8Reader.java:162) at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:68) at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:40) at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:46) at retrofit2.converter.moshi.MoshiResponseBodyConverter.convert(MoshiResponseBodyConverter.java:27) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:243) at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:153) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)
I guess this is because the object received does not match the expected one.
Created a pull request on the google page that will fix this issue https://github.com/google-developer-training/android-kotlin-fundamentals-apps/pull/320/files.
They changed the URL and then it seems they seperatly changed the structure of the JSON file.
Has been fixed on main branch.
https://github.com/google-developer-training/android-kotlin-fundamentals-apps/pull/328
Created a pull request on the google page that will fix this issue https://github.com/google-developer-training/android-kotlin-fundamentals-apps/pull/320/files.
They changed the URL and then it seems they seperatly changed the structure of the JSON file.
That explains the JSON data exception I was facing. The JSON structure had changed. Thanks
If you check on the pull request above they've re-uploaded the old Json file to another url
https://github.com/xueluwei/android_kotlin
you can pull my project for example
https://github.com/xueluwei/android_kotlin
you can pull my project for example
https://github.com/xueluwei/android_kotlin
don't forget give it a star, thanks
Hey folks I struggled with that issue but I was able to successfully change everything needs to work with the API https://gdg.community.dev/api/chapter_region?chapters=true.
If anyone want to check out what I did here's the commit.