TellRaw/src/main/java/cn/citycraft/TellRaw/common/JsonRepresentedObject.java

23 lines
588 B
Java

package cn.citycraft.TellRaw.common;
import java.io.IOException;
import cn.citycraft.GsonAgent.api.stream.JsonWriter;
/**
* Represents an object that can be serialized to a JSON writer instance.
*/
public 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.
*/
public void writeJson(JsonWriter writer) throws IOException;
}