PlotSquared/src/main/java/com/plotsquared/bukkit/chat/JsonRepresentedObject.java

20 lines
533 B
Java
Raw Normal View History

2015-07-31 03:24:01 +10:00
package com.plotsquared.bukkit.chat;
2015-07-27 19:50:04 +02:00
import java.io.IOException;
2015-07-31 00:25:16 +10:00
import com.google.gson.stream.JsonWriter;
/**
* Represents an object that can be serialized to a JSON writer instance.
*/
2015-09-13 14:04:31 +10:00
interface JsonRepresentedObject {
2015-09-11 20:09:22 +10:00
/**
* 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;
2015-09-13 14:04:31 +10:00
}