public final class GsonUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.google.gson.Gson |
getGson()
Retrieves a non-pretty printing Gson instance, which
can be used for converting JSON objects to Strings or Java objects,
and vice versa.
|
static com.google.gson.Gson |
getPrettyGson()
Retrieves a pretty printing Gson instance, which
can be used for converting JSON objects to Strings or Java objects,
and vice versa.
|
static void |
init(com.google.gson.GsonBuilder builder)
Initializes the Gson instances with a specified builder.
|
public static void init(com.google.gson.GsonBuilder builder)
builder - a GsonBuilder instance that may have registered Adapterspublic static com.google.gson.Gson getGson()
public static com.google.gson.Gson getPrettyGson()
Copyright © 2017–2018. All rights reserved.