title: Cannot deserialize instance of `java.lang.String` in node.js server to kafka connect connection
body: <p>I use curl to submit to our Kafka Connect service a JSON request message with information about the connector, it is working successfully.</p>
  
  <pre><code>$ curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{ \"name\": \"inventory-connector\", \"config\": { \"connector.class\": \"io.debezium.connector.mysql.MySqlConnector\", \"tasks.max\": \"1\", \"database.hostname\": \"mysql\", \"database.port\": \"3306\", \"database.user\": \"debezium\", \"database.password\": \"dbz\", \"database.server.id\": \"184054\", \"database.server.name\": \"dbserver1\", \"database.whitelist\": \"inventory\", \"database.history.kafka.bootstrap.servers\": \"kafka:9092\", \"database.history.kafka.topic\": \"dbhistory.inventory\" } }'
  </code></pre>
  
  <p>now I am using node.js server to send data to kafka connect server.</p>
  
  <pre><code>  var body = {
    "name": "abc",
    "config": {
      "connector.class": "io.debezium.connector.mysql.MySqlConnector",
      "tasks.max": "1",
      "database.hostname": "mysql",
      "database.port": "3306",
      "database.user": "debezium",
      "database.password": "dbz",
      "database.server.id": "184054",
      "database.server.name": "dbserver1",
      "database.whitelist": "inventory",
      "database.history.kafka.bootstrap.servers": "kafka:9092",
      "database.history.kafka.topic": "schema-changes.inventory"
    }
  };
  
    var options = {
        method: 'PUT',
        uri: 'http://localhost/connectors/abc/config',
        headers: {
            'User-Agent': 'Request-Promise'
        },
        json: true ,
        body: body
    };
  
    rp(options)
        .then(function (data) {
            return res.status(200).json({ 'data': data});
        })
        .catch(function (err) {
          console.log(err);
            return res.status(500).json({ error: err});
        });
  </code></pre>
  
  <p>however the code throw out an error: saying </p>
  
  <pre><code>{ StatusCodeError: 500 - {"error_code":500,"message":"Cannot deserialize instance of `java.lang.String` out of START_OBJECT token\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 42] (through reference chain: java.util.LinkedHashMap[\"config\"])"}
  </code></pre>
  
  <p>The API description is from <a href="https://docs.confluent.io/current/connect/references/restapi.html" rel="nofollow noreferrer">https://docs.confluent.io/current/connect/references/restapi.html</a></p>
  
  <p><a href="https://i.stack.imgur.com/udhWB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/udhWB.png" alt="enter image description here"></a></p>