public interface JsonUtil
Abstracted JSON utilities for serialisation and de-serialisation, so we're not reliant on any one JSON library for the basic code
| Modifier and Type | Method and Description |
|---|---|
<T> T |
deserialise(InputStream is,
Class<T> class1)
Deserialise an input stream representation of a JSON document to the named class
|
<T> T |
deserialise(String input,
Class<T> class1)
Deserialise a string representation of a JSON document to the named class
|
<T> String |
serialise(T object)
Serialise an object to a JSON string
|
<T> T deserialise(InputStream is, Class<T> class1) throws JsonSerialisationException
T - Class to deserialise tois - The input stream to deserialiseclass1 - The class to which is should be deserialisedJsonSerialisationException - If something goes horribly wrong in deserialisation<T> T deserialise(String input, Class<T> class1) throws JsonSerialisationException
T - Class to deserialise toinput - The input string to deserialiseclass1 - The class to which the input should be deserialisedJsonSerialisationException - If something goes horribly wrong in deserialisation<T> String serialise(T object) throws JsonSerialisationException
T - Class to serialiseobject - The object to be serialisedJsonSerialisationException - If something goes horribly wrong in serialisationCopyright © 2015 Dan Shannon. All rights reserved.