# Special characters not supported in delimiter of json\_lines codec

**URL:** <https://discuss.elastic.co/t/special-characters-not-supported-in-delimiter-of-json-lines-codec/114560>\
**Category:** Logstash\
**Created:** [January 8, 2018, 4:31pm UTC](https://discuss.elastic.co/t/special-characters-not-supported-in-delimiter-of-json-lines-codec/114560 "2018-01-08T16:31:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimw](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@dimw](https://discuss.elastic.co/u/dimw)\
**Post date:** [January 8, 2018, 4:31pm UTC](https://discuss.elastic.co/t/special-characters-not-supported-in-delimiter-of-json-lines-codec/114560/1 "2018-01-08T16:31:06Z")

</div>

According to [the documentation of _json\_lines_ codec plugin](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-json_lines.html#plugins-codecs-json_lines-delimiter) the default value of the `delimiter` option is newline (`\n`). However, when `\n` (or other unicode/special character like `\x00`) is explicitly defined in the input configuration of Logstash, it is considered to be a string containing of two characters:`\` and `n`.

Thus, e.g. when using _telnet_ connected to TCP port of Logstash, the version with default delimiter produces log output on every line whereas the version with delimiter produces a log output only when _backslash_ + _n_ are typed.

Any ideas why this happens and how to pass a delimiter which is a special character via configuration file?

Tested images: `docker.elastic.co/logstash/logstash:5.6.5` and `docker.elastic.co/logstash/logstash:6.1.1`

Plugin version:

```auto
$ logstash-plugin list --verbose
...
logstash-codec-json_lines (3.0.5)
...

```

Example configuration:

```auto
input {
    tcp {
        codec => json_lines { 
          delimiter => "\n"
        }
        port => 12202
    }
}

output {
    stdout {
      codec => "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:** [February 5, 2018, 4:31pm UTC](https://discuss.elastic.co/t/special-characters-not-supported-in-delimiter-of-json-lines-codec/114560/2 "2018-02-05T16:31:10Z")

</div>

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