PlotSquared/src/main/java/com/plotsquared/bukkit/chat/JsonRepresentedObject.java
2015-09-11 20:09:22 +10:00

21 lines
525 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;
}