PlotSquared/src/main/java/com/plotsquared/bukkit/chat/JsonRepresentedObject.java
2015-09-13 14:04:31 +10:00

20 lines
533 B
Java

package com.plotsquared.bukkit.chat;
import java.io.IOException;
import com.google.gson.stream.JsonWriter;
/**
* Represents an object that can be serialized to a JSON writer instance.
*/
interface JsonRepresentedObject {
/**
* Writes the JSON representation of this object to the specified writer.
* @param writer The JSON writer which will receive the object.
* @throws IOException If an error occurs writing to the stream.
*/
void writeJson(final JsonWriter writer) throws IOException;
}