Gson library in Android Studio

Venky picture Venky · May 5, 2016 · Viewed 144.1k times · Source

Can someone give me step by step guide to add the Gson library to an Android project?

I tried the JSON built-in library but that seems to be a bit tedious right now. I saw a couple of examples based on Gson, and that seems really easy.

Answer

Add following dependency or download Gson jar file

implementation 'com.google.code.gson:gson:2.8.6'

Follow github repo for documentation and more.