Package de.alpharogroup.gson
Class ObjectToJsonExtensions
- java.lang.Object
-
- de.alpharogroup.gson.ObjectToJsonExtensions
-
public final class ObjectToJsonExtensions extends java.lang.ObjectThe classObjectToJsonExtensionsconverts java objects to json string objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.StringtoJson(java.util.List<T> list)Creates from the givenLista json stringstatic <T> java.lang.StringtoJson(T object)Creates a jsonStringfrom the given argument object
-
-
-
Method Detail
-
toJson
public static <T> java.lang.String toJson(java.util.List<T> list)
Creates from the givenLista json string- Type Parameters:
T- the generic type- Parameters:
list- the list- Returns:
- the json string.
-
toJson
public static <T> java.lang.String toJson(T object)
Creates a jsonStringfrom the given argument object- Type Parameters:
T- the generic type of the given argument object- Parameters:
object- the object.- Returns:
- the json string.
-
-