package com.github.rschmitt.dynamicobject;

public interface EdnTranslator<T> {
    /**
     * Read a tagged Edn object as its intended type.
     */
    T read(Object obj);

    /**
     * Return an Edn representation of the given object.
     */
    String write(T obj);

    /**
     * Return the tag literal to use during serialization.
     */
    String getTag();
}

@@ -39,16 +39,101 @@
 ect;%0D%0A%0D%0A
+import java.io.IOException;%0D%0Aimport java.io.StringWriter;%0D%0Aimport java.io.Writer;%0D%0A%0D%0A
 public i
@@ -337,24 +337,32 @@
     */%0D%0A    
+default 
 String write
@@ -372,111 +372,550 @@
 obj)
-;%0D%0A%0D%0A    /**%0D%0A     * Return the tag literal to use during serialization.%0D%0A     */%0D%0A    String getTag();
+ %7B%0D%0A        StringWriter stringWriter = new StringWriter();%0D%0A        write(obj, stringWriter);%0D%0A        return stringWriter.toString();%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Return the tag literal to use during serialization.%0D%0A     */%0D%0A    String getTag();%0D%0A%0D%0A    /**%0D%0A     * Write an Edn representation of the given object to the given Writer.%0D%0A     */%0D%0A    default void write(T obj, Writer writer) %7B%0D%0A        try %7B%0D%0A            writer.write(write(obj));%0D%0A        %7D catch (IOException ex) %7B%0D%0A            throw new RuntimeException(ex);%0D%0A        %7D%0D%0A    %7D
 %0D%0A%7D%0D

Add Writer support