# Parsing a non pure Json

**URL:** <https://discuss.elastic.co/t/parsing-a-non-pure-json/83699>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 26, 2017, 12:23pm UTC](https://discuss.elastic.co/t/parsing-a-non-pure-json/83699 "2017-04-26T12:23:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [April 26, 2017, 12:23pm UTC](https://discuss.elastic.co/t/parsing-a-non-pure-json/83699/1 "2017-04-26T12:23:38Z")

</div>

Hi,

I am trying to parse a string that contains a json. The format of the string is {a:1,b:2 ... }.  
Until now I read only strings that are built like a Json with no strings attached to the start or end of it.

Many Thanks,  
Tomer

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [April 27, 2017, 3:14pm UTC](https://discuss.elastic.co/t/parsing-a-non-pure-json/83699/2 "2017-04-27T15:14:56Z")

</div>

Having non pure json in filebeat will not work. I assume you could do some magic in Logstash to do this, for example with the ruby filter: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html)

---

<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:** [May 25, 2017, 3:17pm UTC](https://discuss.elastic.co/t/parsing-a-non-pure-json/83699/3 "2017-05-25T15:17:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
