> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/connectors/tutorials/source-converters-with-incoming-json-or-avro.md).

# Source converters with incoming JSON or Avro

This page describes how to use converters with source systems sending JSON and 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
