# Treat string as JSON

**URL:** <https://discuss.elastic.co/t/treat-string-as-json/56091>\
**Category:** Logstash\
**Created:** [July 21, 2016, 12:35pm UTC](https://discuss.elastic.co/t/treat-string-as-json/56091 "2016-07-21T12:35:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwjvaughan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dwjvaughan/32/10648_2.png) [@dwjvaughan](https://discuss.elastic.co/u/dwjvaughan)\
**Post date:** [July 21, 2016, 12:35pm UTC](https://discuss.elastic.co/t/treat-string-as-json/56091/1 "2016-07-21T12:35:20Z")

</div>

I have JSON stored in an Oracle database as a CLOB (serialised JSON string). I'd like to get this into Elasticsearch as a JSON object.

I have the input specified as jdbc (with the oracle connection string etc) and the output as elasticsearch. The problem is that the JSON is being stored in ES as one big string. I assume I need to do some kind of filter, I'm just not sure where to start?

Any help is greatly appreciated.

Dave

---

<div class="post-metadata">

**Author:** ![tollef](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@tollef](https://discuss.elastic.co/u/tollef)\
**Post date:** [July 21, 2016, 12:59pm UTC](https://discuss.elastic.co/t/treat-string-as-json/56091/2 "2016-07-21T12:59:48Z")

</div>

I would suggest starting with [the json filter](https://www.elastic.co/guide/en/logstash/5.0/plugins-filters-json.html) 🙂

---

<div class="post-metadata">

**Author:** ![dwjvaughan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dwjvaughan/32/10648_2.png) [@dwjvaughan](https://discuss.elastic.co/u/dwjvaughan)\
**Post date:** [July 21, 2016, 2:11pm UTC](https://discuss.elastic.co/t/treat-string-as-json/56091/3 "2016-07-21T14:11:17Z")

</div>

Seems like a good suggestion to me 🙂, thank you!

I've just been trying to parse the JSON only to find the data in the DB isn't actually valid 😬

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:47am UTC](https://discuss.elastic.co/t/treat-string-as-json/56091/4 "2017-07-06T04:47:02Z")

</div>


