title: How do I configure kafka-connect-spooldir to consume a json array?
body: <p>I've configured kafka-connect-spooldir to consume files containing JSON objects according to the instructions at <a href="https://github.com/jcustenborder/kafka-connect-spooldir" rel="nofollow noreferrer">https://github.com/jcustenborder/kafka-connect-spooldir</a>.  This consumes files containing one or more JSON objects.  Now how can I configure this to consume a file containing a JSON array instead?  </p>
  
  <p>Here is my current key and value schemas:</p>
  
  <pre><code>key.schema={"name": "com.example.users.UserKey", "type": "STRUCT", "isOptional": false, "fieldSchemas": {"id": {"type": "INT64", "isOptional": false }}}
  value.schema={"name": "com.example.users.User", "type": "STRUCT", "isOptional": false, "fieldSchemas": {"id": {"type": "INT64", "isOptional": false}, "test": {"type": "STRING", "isOptional": true}}}
  </code></pre>
  
  <p>Here is a sample of my data:</p>
  
  <pre><code>{
    "id": 10,
    "test": "Carla Howe"
  }
  {
    "id": 1,
    "test": "Gayle Becker"
  }
  </code></pre>
  
  <p>Here is what I would like the data to look like:</p>
  
  <pre><code>[
    {
      "id": 10,
      "test": "Carla Howe"
    },
    {
      "id": 1,
      "test": "Gayle Becker"
    }
  ]
  </code></pre>
  
  <p>I've tried simply to change the first type from STRUCT to ARRAY, but this throws an NPE "valueSchema cannot be null".</p>
  
  <p>Can someone please point me in the right direction, or provide an example?</p>