# How to format inregular json-string like this?

**URL:** <https://discuss.elastic.co/t/how-to-format-inregular-json-string-like-this/253375>\
**Category:** Logstash\
**Created:** [October 27, 2020, 1:12am UTC](https://discuss.elastic.co/t/how-to-format-inregular-json-string-like-this/253375 "2020-10-27T01:12:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![knight](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@knight](https://discuss.elastic.co/u/knight)\
**Post date:** [October 27, 2020, 1:12am UTC](https://discuss.elastic.co/t/how-to-format-inregular-json-string-like-this/253375/1 "2020-10-27T01:12:39Z")

</div>

i have a json-string like this :  
`{ "aa":"123", "bb":"hello", "cc":"===this is inregular json==={"dd":"world","ee":"logstash"}" }`  
now,the config file in logstash is :  
`input { kafka { bootstrap_servers => "ip:port" topics => ["logging"] client_id => "logstashnode1" type => "kafka" codec => "json" group_id => "test" auto_offset_reset => "latest" } } output { elasticsearch { hosts => ["ip:port"] index => "%{index}" } }`  
when logstash is running , format json throw error,parse json error.because of the column "cc" 's value is like  
` "===this is inregular json==={"dd":"world","ee":"logstash"}" `  
combine with common string and json string.  
so,how to format inregular json-string like this(i want not the columb "cc"'value parse to json)?

---

<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:** [November 24, 2020, 1:12am UTC](https://discuss.elastic.co/t/how-to-format-inregular-json-string-like-this/253375/2 "2020-11-24T01:12:39Z")

</div>

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