public class JsonUtils extends Object
| Constructor and Description |
|---|
JsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <TEntity> String |
getAsJsonString(TEntity source)
Returns the given Entity as a JSON String.
|
static <TEntity> TEntity |
getEntityFromString(String source,
Class<TEntity> valueType)
Deserializes a JSON String into a Java Object.
|
public static <TEntity> String getAsJsonString(TEntity source)
TEntity - Type of the Source object.source - The Source object, which should be annotated-public static <TEntity> TEntity getEntityFromString(String source, Class<TEntity> valueType)
TEntity - The type of the Java class.source - The Source JSONvalueType - The Class to deserialize into.Copyright © 2017. All rights reserved.