# Logstash JSON ParserError: Unexpected characher '-'

**URL:** <https://discuss.elastic.co/t/logstash-json-parsererror-unexpected-characher/183400>\
**Category:** Logstash\
**Created:** [May 29, 2019, 6:12pm UTC](https://discuss.elastic.co/t/logstash-json-parsererror-unexpected-characher/183400 "2019-05-29T18:12:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [May 29, 2019, 6:12pm UTC](https://discuss.elastic.co/t/logstash-json-parsererror-unexpected-characher/183400/1 "2019-05-29T18:12:09Z")

</div>

It appears that LogStash doesn't like hyphens or something?

These are IIS logs by the way. I get this error in my date field:

> [2019-05-28T16:35:58,176][WARN][logstash.codecs.jsonlines] JSON parse error, original data now in message field {:error=\>#\<LogStash::Json::ParserError: Unexpected character ('-' (code 45)): Expected space separating root-level values  
> at [Source: (String)"2019-05-27....(data)....line: 1, column: 6.....(data)....

Column 6 is the hyphen after 2019. Any ideas?

---

<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:** [May 29, 2019, 6:38pm UTC](https://discuss.elastic.co/t/logstash-json-parsererror-unexpected-characher/183400/2 "2019-05-29T18:38:17Z")

</div>

You are ingesting IIS logs with a json\_lines codec? Last I looked IIS does not log in JSON format. Remove the codec from the input.

---

<div class="post-metadata">

**Author:** ![motts](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@motts](https://discuss.elastic.co/u/motts)\
**Post date:** [May 29, 2019, 6:47pm UTC](https://discuss.elastic.co/t/logstash-json-parsererror-unexpected-characher/183400/3 "2019-05-29T18:47:16Z")

</div>

Ah OK. That must be what I was misunderstanding, logically speaking. I was thinking it was needed to process JSON data. I'll give that a try and post back if it doesn't work.

Thanks

---

<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:** [June 26, 2019, 6:47pm UTC](https://discuss.elastic.co/t/logstash-json-parsererror-unexpected-characher/183400/4 "2019-06-26T18:47:23Z")

</div>

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