# Source converters with incoming JSON or Avro

Source converters depend on the source system you are reading data from. The Connect *SourceTask* class requires you to supply a List of *SourceRecords*. Those records can have a schema but how the schema is translated from the source system to a Connect Struct depends on the connector.

We provide four converters out of the box but you can plug in your own. The `WITHCONVERTER` keyword supports this option. These can be used when source systems send records as JSON or AVRO, for example, MQTT or JMS.

{% hint style="info" %}
Not all Connectors support the source converters. Check the option reference for your connector.
{% endhint %}

Before records are passed back to connect, they go through the converter if specified.

## AvroConverter  <a href="#avroconverter" id="avroconverter"></a>

```bash
io.lenses.streamreactor.connect.converters.source.AvroConverter
```

The payload is an Avro message. In this case, you need to provide a path for the Avro schema file to be able to decode it.

## JsonPassThroughConverter

```
io.lenses.streamreactor.connect.converters.source.JsonPassThroughConverter 
```

The incoming payload is JSON,  the resulting Kafka message value will be of type string and the contents will be the incoming JSON.

## JsonSimpleConverter  <a href="#jsonsimpleconverter" id="jsonsimpleconverter"></a>

```bash
io.lenses.streamreactor.connect.converters.source.JsonSimpleConverter
```

The payload is a JSON message. This converter will parse the JSON and create an Avro record for it which will be sent to Kafka.

## JsonConverterWithSchemaEvolution  <a href="#jsonconverterwithschemaevolution" id="jsonconverterwithschemaevolution"></a>

An experimental converter for translating JSON messages to Avro. The Avro schema is fully compatible as new fields are added as the JSON payload evolves.

## BytesConverter  <a href="#bytesconverter" id="bytesconverter"></a>

```bash
io.lenses.streamreactor.connect.converters.source.BytesConverter
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/connectors/tutorials/source-converters-with-incoming-json-or-avro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
