# JSON parse failure

**URL:** <https://discuss.elastic.co/t/json-parse-failure/355821>\
**Category:** Logstash\
**Created:** [March 20, 2024, 2:10pm UTC](https://discuss.elastic.co/t/json-parse-failure/355821 "2024-03-20T14:10:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnson\_will](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnson_will/32/123002_2.png) [@Johnson\_will](https://discuss.elastic.co/u/Johnson_will)\
**Post date:** [March 20, 2024, 2:10pm UTC](https://discuss.elastic.co/t/json-parse-failure/355821/1 "2024-03-20T14:10:55Z")

</div>

```auto
 Error parsing json {:source=>"message", :raw=>"Error running job", :exception=>#<LogStash::Json::ParserError: Unrecognized token 'Error': was expecting ('true', 'false' or 'null')
 at [Source: (byte[])"Error running job"; line: 1, column: 7]>}
{
     "extractCount" => -1,
             "host" => "127.0.0.1",
    "jobHistoryUrl" => "api",
           "status" => "ERROR",
          "dagName" => "name",
        "startDate" => "2024-03-19T22:37:20+00:00",
     "createdFiles" => [],
          "headers" => {
           "request_path" => "/",
        "http_user_agent" => "Java/17.0.10",
              "http_host" => "127.0.0.1:8081",
         "content_length" => "623",
            "http_accept" => "text/plain, application/json, application/*+json, */*",
           "http_version" => "HTTP/1.1",
             "connection" => "keep-alive",
           "content_type" => "text/plain;charset=ISO-8859-1",
         "request_method" => "POST"
    },
           "errors" => [
        [0] "file_sensor: Failed"
    ],
             "tags" => [
        [0] "_jsonparsefailure"
    ],
          "jobName" => "data",
    "workspaceName" => "work",
    "hdfsSavePaths" => [
        [0] "path"
    ],
          "appCode" => "weq",
          "message" => "Error running job",
         "@version" => "1",
       "@timestamp" => 2024-03-19T22:51:17.164Z
}
[2024-03-19T18:51:54,744][WARN][logstash.filters.json][main][b9914b91c5592ef6b19792acc52eedc9fc5809c550a4a267cc0a43452969fc79] Error parsing json {:source=>"message", :raw=>"Error running job", :exception=>#<LogStash::Json::ParserError: Unrecognized token 'Error': was expecting ('true', 'false' or 'null')
 at [Source: (byte[])"Error running job"; line: 1, column: 7]>}

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 20, 2024, 4:06pm UTC](https://discuss.elastic.co/t/json-parse-failure/355821/2 "2024-03-20T16:06:29Z")

</div>

> [@Johnson\_will](#):
>
> ```auto
> "message" => "Error running job",
> 
> ```

You are trying to parse that as though it were JSON, but it is not.

---

<div class="post-metadata">

**Author:** ![Johnson\_will](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnson_will/32/123002_2.png) [@Johnson\_will](https://discuss.elastic.co/u/Johnson_will)\
**Post date:** [March 21, 2024, 9:10pm UTC](https://discuss.elastic.co/t/json-parse-failure/355821/3 "2024-03-21T21:10:46Z")

</div>

Thanks Badger, it resolved the issue

---

<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:** [April 18, 2024, 9:10pm UTC](https://discuss.elastic.co/t/json-parse-failure/355821/4 "2024-04-18T21:10:47Z")

</div>

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