# Issue in parsing huge json file

**URL:** https://discuss.elastic.co/t/issue-in-parsing-huge-json-file/93596
**Category:** Logstash
**Created:** [July 18, 2017, 1:34pm UTC](https://discuss.elastic.co/t/issue-in-parsing-huge-json-file/93596 "2017-07-18T13:34:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Narayanan\_Sukumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narayanan_sukumar/32/19546_2.png) [@Narayanan\_Sukumar](https://discuss.elastic.co/u/Narayanan_Sukumar)
#### Post date: [July 18, 2017, 1:34pm UTC](https://discuss.elastic.co/t/issue-in-parsing-huge-json-file/93596/1 "2017-07-18T13:34:26Z")

</div>

I have a huge json file in a log for one success api call. I am able to see that response at when there is no filter is applied over it.(seeing as string)

\*\*\*Small json are working as intended.

When I am applying the json filter, it is not coming at the logstash output (I have tried writing the output to a file for confirming).

Is there any logstash configuration which needs to be taken care.

# My config:

input {

# kafka { bootstrap\_servers =\> 'server1:9092, server2:9092, server3:9092' #add the kafka hosts here topics =\> ["xxxxxxxxxx"] codec =\> "json" } }

filter {  
json {  
source =\> "message"  
skip\_on\_invalid\_json =\> "true"  
}

```
mutate {
	add_field => {"index_name" => '%{type}'}
	add_field => {"type_name" => '%{type}'}

```

# } }

output {

# if [type\_name] == "xxxxxxx" { elasticsearch { hosts =\> ["xxxxxxxxxxx:80"] index =\> "%{[type\_name]}-%{+YYYY.MM.dd}" document\_type =\> "%{[type\_name]}" } file { path =\> "/srv/logs/xxxxxxx.log" codec =\> line { format =\> "message: %{message}" } } }

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [July 21, 2017, 3:45pm UTC](https://discuss.elastic.co/t/issue-in-parsing-huge-json-file/93596/2 "2017-07-21T15:45:06Z")

</div>

I'm confused. You have the `json` codec decoding the JSON messages from Kafka, then you also have the `json` filter to reparse the message field? Is there JSON inside of JSON here?

---

<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: [August 18, 2017, 3:45pm UTC](https://discuss.elastic.co/t/issue-in-parsing-huge-json-file/93596/3 "2017-08-18T15:45:14Z")

</div>

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