Tech and Media Labs
This site uses cookies to improve the user experience.




GSON - Installation

Jakob Jenkov
Last update: 2015-06-13

To use GSON in your Java application you need to include the GSON JAR file in the classpath of your Java application. You can do so either by adding GSON as a Maven dependency to your project, or by downloading the JAR file and include it in the classpath manually.

GSON as Maven Dependency

GSON as a Maven dependency looks like this:

<dependency>
    <groupId>com.google.code.gson</groupId>
    <artifactId>gson</artifactId>
    <version>2.3.1</version>
</dependency>

Remember to insert the version of GSON you plan to use.

Download the GSON JAR File

If you are not using Maven in your Java project you can also download the GSON JAR file directly from the central Maven repositor. Go to

http://search.maven.org

And search for gson. You will find the JAR file then. Download the JAR file and add it to the classpath of your Java application.

Jakob Jenkov




Copyright  Jenkov Aps
Close TOC