# LogStash::Json::ParserError: Unexpected end-of-input within/between Object entries for curly brace inside string

**URL:** https://discuss.elastic.co/t/logstash-unexpected-end-of-input-within-between-object-entries-for-curly-brace-inside-string/295659
**Category:** Logstash
**Created:** [January 28, 2022, 6:43am UTC](https://discuss.elastic.co/t/logstash-unexpected-end-of-input-within-between-object-entries-for-curly-brace-inside-string/295659 "2022-01-28T06:43:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![truptir](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@truptir](https://discuss.elastic.co/u/truptir)
#### Post date: [January 28, 2022, 6:43am UTC](https://discuss.elastic.co/t/logstash-unexpected-end-of-input-within-between-object-entries-for-curly-brace-inside-string/295659/1 "2022-01-28T06:43:34Z")

</div>

When String contains opening curly braces '{' logstash failed to parse that JSON. As per JSON doc, we don't need to escape curly brace. then how can I parse this type of JSON through logstash?

JSON file:

```auto
{
"DESCRIPTION":"TOP{SET-3}",
"QUANTITY":"1"
}

```

Logstash conf.

```auto
input{
    beats {
        port => "5044"
    }
}
filter {
		prune {
                               whitelist_names => ["^message$","^@timestamp$"]
		}
    json {
            source => "message"
            target => "target"
    }
.........
}
output{
...........
}

```

ERROR:

```auto
 :exception=>#<LogStash::Json::ParserError: Unexpected end-of-input within/between Object entries
:exception=>#<LogStash::Json::ParserError: Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: (byte[])""DESCRIPTION":"TOP{SET-3}",
"QUANTITY":"1"}

```

Can anyone help here?

Thanks:)

---

<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: [January 28, 2022, 4:05pm UTC](https://discuss.elastic.co/t/logstash-unexpected-end-of-input-within-between-object-entries-for-curly-brace-inside-string/295659/2 "2022-01-28T16:05:28Z")

</div>

A json filter will parse

```
{ "DESCRIPTION":"TOP{SET-3}", "QUANTITY":"1" }

```

exactly as one would expect. Given

```
"DESCRIPTION":"TOP{SET-3}", "QUANTITY":"1" }

```

it will produce exactly the error you show. I suspect the problem is that the regexp you are using in a multiline processor in filebeat is incorrectly matching the mid-line { and treating it as a new JSON object.

---

<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: [February 25, 2022, 4:06pm UTC](https://discuss.elastic.co/t/logstash-unexpected-end-of-input-within-between-object-entries-for-curly-brace-inside-string/295659/3 "2022-02-25T16:06:15Z")

</div>

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