|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.egit.github.core.client.GsonUtils
public abstract class GsonUtils
Gson utilities.
| Constructor Summary | |
|---|---|
GsonUtils()
|
|
| Method Summary | ||
|---|---|---|
static com.google.gson.Gson |
createGson()
Create the standard Gson configuration |
|
static com.google.gson.Gson |
createGson(boolean serializeNulls)
Create the standard Gson configuration |
|
static
|
fromJson(Reader reader,
Class<V> type)
Convert content of reader to given type |
|
static
|
fromJson(Reader reader,
Type type)
Convert content of reader to given type |
|
static
|
fromJson(String json,
Class<V> type)
Convert string to given type |
|
static
|
fromJson(String json,
Type type)
Convert string to given type |
|
static com.google.gson.Gson |
getGson()
Get reusable pre-configured Gson instance |
|
static com.google.gson.Gson |
getGson(boolean serializeNulls)
Get reusable pre-configured Gson instance |
|
static String |
toJson(Object object)
Convert object to json |
|
static String |
toJson(Object object,
boolean includeNulls)
Convert object to json |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GsonUtils()
| Method Detail |
|---|
public static final com.google.gson.Gson createGson()
Gson configuration
public static final com.google.gson.Gson createGson(boolean serializeNulls)
Gson configuration
serializeNulls - whether nulls should be serialized
public static final com.google.gson.Gson getGson()
Gson instance
public static final com.google.gson.Gson getGson(boolean serializeNulls)
Gson instance
serializeNulls -
public static final String toJson(Object object)
object -
public static final String toJson(Object object,
boolean includeNulls)
object - includeNulls -
public static final <V> V fromJson(String json,
Class<V> type)
json - type -
public static final <V> V fromJson(String json,
Type type)
json - type -
public static final <V> V fromJson(Reader reader,
Class<V> type)
reader - type -
public static final <V> V fromJson(Reader reader,
Type type)
reader - type -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||