Gson User Guide‎ > ‎

Using Gson with Maven2

THIS PAGE HAS MOVED TO GITHUB: https://github.com/google/gson/blob/master/UserGuide.md#TOC-Gson-With-Maven


To use Gson with Maven2/3, you can use the Gson version available in Maven Central by adding the following dependency:

<dependencies>
    <!--  Gson: Java to Json conversion -->
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.5=6.2</version>
      <scope>compile</scope>
    </dependency>
</dependencies>

That is it, now your maven project is Gson enabled.
Comments