Package com.softlayer.api.json
Interface JsonMarshaller
-
public interface JsonMarshaller
Interface that must be implemented by all JSON marshallers. This instance is not reused unlessJsonMarshallerFactory.getJsonMarshaller()
returns the same instance multiple times.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
fromJson(Type type, InputStream in)
Convert the JSON stream to the given type.void
toJson(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
-
-