// Copyright (c) Cognitect, Inc.
// All rights reserved.

package com.cognitect.transit;

public class TestRoundtrip {

    public static void main(String [] args) throws Exception {

        // TODO: use argument to set up json or msgpack
        Reader reader = Reader.getJsonInstance(System.in, Reader.defaultDecoders());
        Writer writer = Writer.getJsonInstance(System.out, Writer.defaultHandlers());

        try {
            while(true) {
                Object o = reader.read();
                writer.write(o);
            }
        }
        catch(Exception e) {
            // exit
        }
    }
}

@@ -189,70 +189,331 @@
     
-// TODO: use argument to set up json or msgpack%0A        Reader
+String encoding = args%5B0%5D;%0A%0A        Reader reader;%0A        Writer writer;%0A%0A        if(encoding.equals(%22msgpack%22)) %7B%0A            reader = Reader.getMsgpackInstance(System.in, Reader.defaultDecoders());%0A            writer = Writer.getMsgpackInstance(System.out, Writer.defaultHandlers());%0A        %7D%0A        else %7B%0A           
  rea
@@ -583,30 +583,27 @@
 ));%0A        
-Writer
+   
  writer = Wr
@@ -661,16 +661,26 @@
 lers());
+%0A        %7D
 %0A%0A      

Use args to create the desired instance of transit