title: Kafka Connect JSON format
body: <p>I have a topic titled <code>newtest</code> in Kafka with three messages:</p>
  
  <pre><code>Hello 
  Is anybody out there
  Can you hear me
  </code></pre>
  
  <p>...and I have the following config for a connect job:</p>
  
  <pre><code>{
      "name":"connect-test-9",
      "config":
      {
          "connector.class":"FileStreamSink",
          "file":"connector-test",
          "topics":"newtest",
          "name":"connect-test-9",
          "value.converter":"org.apache.kafka.connect.storage.StringConverter",
          "value.converter.schemas.enable":"false",
          "key.converter":"org.apache.kafka.connect.storage.StringConverter",
          "key.converter.schemas.enable":"false",
          "transforms":"Hoist, AddTimestamp",
          "transforms.Hoist.type":"org.apache.kafka.connect.transforms.HoistField$Value",
          "transforms.Hoist.field":"line",
          "transforms.AddTimestamp.type":"org.apache.kafka.connect.transforms.InsertField$Value",
          "transforms.AddTimestamp.timestamp.field":"Timestamp"
      }
  }
  </code></pre>
  
  <p>I'm getting the following output in file <code>connector-test</code>:</p>
  
  <pre><code>Struct{line=Hello,Timestamp=Mon Mar 12 14:50:34 PDT 2018}
  Struct{line=Is anybody out there,Timestamp=Mon Mar 12 14:50:44 PDT 2018}
  Struct{line=Can you hear me,Timestamp=Mon Mar 12 14:50:52 PDT 2018}
  </code></pre>
  
  <p>I would like to get this:</p>
  
  <pre><code>{"line":"Hello","Timestamp":"Mon Mar 12 14:50:34 PDT 2018"}
  {"line":"Is anybody out there","Timestamp":"Mon Mar 12 14:50:44 PDT 2018"}
  {"line":"Can you hear me","Timestamp":"Mon Mar 12 14:50:52 PDT 2018"}
  </code></pre>
  
  <p>I've tried changing the value.converter, no good (parse exception). I also have another topic where the message is already Json, and the parse succeeds there, and I can add a Timestamp without Hoist. But my output is the same non-Json format <code>{key1=value1,key2=value2}</code>.</p>
  
  <p>Any way I can get the output in proper JSON?</p>
  
  <hr>
  
  <p>This is the parse exception that I see:</p>
  
  <p><code>com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Can': was expecting ('true', 'false', or 'null')</code></p>