# JSON Parse Failure

**URL:** <https://discuss.elastic.co/t/json-parse-failure/301892>\
**Category:** Logstash\
**Created:** [April 7, 2022, 4:00pm UTC](https://discuss.elastic.co/t/json-parse-failure/301892 "2022-04-07T16:00:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Mobley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_mobley/32/94741_2.png) [@Tim\_Mobley](https://discuss.elastic.co/u/Tim_Mobley)\
**Post date:** [April 7, 2022, 4:00pm UTC](https://discuss.elastic.co/t/json-parse-failure/301892/1 "2022-04-07T16:00:48Z")

</div>

I have the following pipeline config:

```auto
input {
  file {
    type => "json"
    path => [C:/temp/*.json"]
    start_position => "beginnning"
    codec => multiline {
      pattern => "^ZsExDrC"
      what => "previous"
      negate => true
      auto_flush_interval => 2
      max_lines => 50000
    }
  }
}

filter {
  json {
    source => "message"
  }
}

output {
  elasticsearch {
    hosts => ["https://hotdata1:9200", "https://hotdata2:9200"]
    index => "index-name-%{+YYYY.MM.dd}"
    user => "logstash_internal"
    password => "xxxxxx"
    ssl => true
    cacert => "path/to/cert"
  }
}

```

It's ingesting the log into ES, but the fields aren't being parsed and I'm getting the following tags: `multiline` and `_jsonparsefailure`. I looked in the LS logs (set to debug), but can't find any more details on what is causing the parse failure. I'm sorry I can't easily share the JSON here, but am wondering if there is anything in my pipeline config that is wrong?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 7, 2022, 4:37pm UTC](https://discuss.elastic.co/t/json-parse-failure/301892/2 "2022-04-07T16:37:40Z")

</div>

Is your document really a json?

You are using a multiline pattern that starts with `ZsExDrC`, for the `json` filter to work your message should be a valid json, it would expect that your message starts with `{`.

Can you share an example of your document? Anonymize any personal information if it is the case.

---

<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 5, 2022, 4:38pm UTC](https://discuss.elastic.co/t/json-parse-failure/301892/3 "2022-05-05T16:38:15Z")

</div>

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