XUtils

Gson

Serializes objects to JSON and vice versa. Good performance with on-the-fly usage.


Download

Gradle:

dependencies {
  implementation 'com.google.code.gson:gson:2.11.0'
}

Maven:

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

Gson jar downloads are available from Maven Central.

Build Status

Requirements

Documentation

  • API Javadoc: Documentation for the current release
  • User guide: This guide contains examples on how to use Gson in your code
  • Troubleshooting guide: Describes how to solve common issues when using Gson
  • Releases and change log: Latest releases and changes in these versions; for older releases see CHANGELOG.md
  • Design document: This document discusses issues we faced while designing Gson. It also includes a comparison of Gson with other Java libraries that can be used for Json conversion

Please use the ‘gson’ tag on StackOverflow, GitHub Discussions or the google-gson Google group to discuss Gson or to post questions.


Articles

  • coming soon...