Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I download the Gson library?

Tags:

github

jar

zip

gson

Should be simple question.

When I go to https://github.com/google/gson I can only download the library as a zip folder as opposed to a jar file.

Where can I get the jar file?

like image 867
user1081679 Avatar asked Jun 22 '16 18:06

user1081679


People also ask

Where can I download Gson?

Gson jar downloads are available from Maven Central.

What is Gson Library in Android?

Google's Gson library provides a powerful framework for converting between JSON strings and Java objects. This library helps to avoid needing to write boilerplate code to parse JSON responses yourself. It can be used with any networking library, including the Android Async HTTP Client and OkHttp.


4 Answers

First you need to clone the repository locally on your computer:

git clone https://github.com/google/gson

Then you go inside the project folder ./gson and you create the jar file running:

mvn package

Of course to do this you need to have maven installed, if you are under osx you can install it running

brew install maven

Otherwise you can look for the installation for your system on the maven official website

After running mvn package the jar file will be in ./gson/gson/target/gson-2.7.1-SNAPSHOT.jar

like image 78
Stram Avatar answered Oct 04 '22 13:10

Stram


There is a MVN Repo http://mvnrepository.com/ there you will find how to add to a maven OR in your case how to download the lib jars

enter image description here

like image 22
ΦXocę 웃 Пepeúpa ツ Avatar answered Oct 04 '22 15:10

ΦXocę 웃 Пepeúpa ツ


I just downloaded it here:

https://jar-download.com/explore-java-source-code.php?a=gson&g=com.google.code.gson&v=2.7&downloadable=1

Is working for me.

like image 20
Martin Meeser Avatar answered Oct 04 '22 15:10

Martin Meeser


am bit late but for anyone in future, https://mvnrepository.com/artifact/com.google.code.gson/gson/2.8.0

ofcourse if its vresion changes you can figure it out from the base url.

like image 39
mcamocci Avatar answered Oct 04 '22 14:10

mcamocci