Package com.softlayer.api.json
Interface JsonMarshaller
-
public interface JsonMarshallerInterface that must be implemented by all JSON marshallers. This instance is not reused unlessJsonMarshallerFactory.getJsonMarshaller()returns the same instance multiple times.
-
-
Method Summary
Modifier and Type Method Description <T> TfromJson(Type type, InputStream in)Convert the JSON stream to the given type.voidtoJson(Object object, OutputStream out)Convert the given object to JSON on the stream.
-
-
-
Method Detail
-
toJson
void toJson(Object object, OutputStream out)
Convert the given object to JSON on the stream. The output stream is closed by this marshaller
-
fromJson
<T> T fromJson(Type type, InputStream in)
Convert the JSON stream to the given type. The input stream is closed by this marshaller
-
-