public interface Jolyglot
JolyglotGenerics| Modifier and Type | Method and Description |
|---|---|
<T> T |
fromJson(java.io.File file,
java.lang.Class<T> classOfT)
This method deserializes the Json read from the specified reader into an object of the
specified class.
|
<T> T |
fromJson(java.lang.String json,
java.lang.Class<T> classOfT)
This method deserializes the specified Json into an object of the specified class.
|
java.lang.String |
toJson(java.lang.Object src)
This method serializes the specified object into its equivalent Json representation.
|
java.lang.String toJson(java.lang.Object src)
src - the object for which Json representation is to be created.src.<T> T fromJson(java.lang.String json,
java.lang.Class<T> classOfT)
throws java.lang.RuntimeException
JolyglotGenerics.fromJson(String, Type). If you have the Json in a File instead of
a String, use fromJson(File, Class) instead.T - the type of the desired objectjson - the string from which the object is to be deserializedclassOfT - the class of Tjava.lang.RuntimeException<T> T fromJson(java.io.File file,
java.lang.Class<T> classOfT)
throws java.lang.RuntimeException
JolyglotGenerics.fromJson(File, Type). If you have the Json in a String form instead of a
File, use fromJson(String, Class) instead.T - the type of the desired objectfile - the file producing the Json from which the object is to be deserialized.classOfT - the class of Tjava.lang.RuntimeException