# Json is storing as string in es

**URL:** https://discuss.elastic.co/t/json-is-storing-as-string-in-es/93062
**Category:** Logstash
**Created:** [July 13, 2017, 5:25pm UTC](https://discuss.elastic.co/t/json-is-storing-as-string-in-es/93062 "2017-07-13T17:25:09Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![ELK\_GB](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@ELK\_GB](https://discuss.elastic.co/u/ELK_GB)
#### Post date: [July 13, 2017, 8:33pm UTC](https://discuss.elastic.co/t/json-is-storing-as-string-in-es/93062/4 "2017-07-13T20:33:53Z")

</div>

here is what resolved my issue, hopefully will help you, im running LS 5.4 and this resolved the json codec not working.

`bin/logstash-plugin update logstash-input-kafka`

update your LS Kafka input plugin.

stop LS then run the above command.

BTW this may not work:

```
if [@metadata][type] == "my_app" {
       json {
               source => "message"
        }

```

check this topic:

> [@Logstash 5.2 input kafka working but no output to elasticsearch](https://discuss.elastic.co/t/logstash-5-2-input-kafka-working-but-no-output-to-elasticsearch/74720):
>
> Issue Summary: filebeat outputs to kafka 0.10 topic logstash indexer inputs from kafka 0.10 outputs to elasticsearch Problem: document count on elasticsearch doesn't change Note: I'm able to get filebeat=\>logstash=\>elasticsearch working ok. When I try to add the kafka broker and adjust input/output accordingly, the content consumed by logstash doesn't output to elasticsearch. Versions logstash version # /usr/share/logstash/bin/logstash -V logstash 5.2.0 installed from [elastic.co](http://elastic.co) repository…

---

_[View the full topic](https://discuss.elastic.co/t/json-is-storing-as-string-in-es/93062)._
